🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Align sight to camera

Started by
11 comments, last by Fulcrum.013 6 years ago
On 6/4/2018 at 6:51 PM, Scouting Ninja said:

You can offset rotation by using Sin and Cos and you can offset location by making a new vector from the old one with the offset added in. Without the animations I can't tell you the exact amount or formula.

It's easier to change the pose. Unreal was made for this kind of adjustments. If you don't want to use a 3D tool for this you can use a empty and use that to offset the whole rig.

Is this happening because you are using animations from two different animation sets? Because animation re-targeting can be used to quickly fix this.

2

I made it work. With the more mainstream approaches, we would require quite a bit of tweaking and since we are a very small team we can't afford it. The math I posted was correct except for the part in which I set the location and rotation of the Mesh1P to counter the socket's transform.

This way I can use less than ideal animation poses and always have the weapon centered.

Thank you very much for your help and taking time to help me out!

Advertisement
On 4/7/2018 at 12:34 AM, Agustin Andreucci said:

Right now the poses I have are close but slightly rotated and translated.

You need not a just sloth. You need a axe that comes from sight to muzzle-sight and eye point on it. With those markups on model it require just translate and rotate a weapon to match eye point with camera point, and axe that connecting sights  with camera direction, then recalulate arms pose using simplified IK. Trick is - forearm with fist and  upper arm have equal length. So elbow anytime lies on central normal to line segment that comes from shoulder to center of palm. So it enought to add 2 additional markups  on weapon - touch points onto its handles to calculate arms transformation  .

#define if(a) if((a) && rand()%100)

This topic is closed to new replies.

Advertisement