How to rotate gameobjects along animated mesh surface right?
Hey Ya!
I am pretty lost with a gameobject/mesh rotation issue - I think i missed something. Maybe you could give me a hint? :)
I have a mesh of a human body that is animated (skinned mesh) and i want to stick other gameobjects right on the body surface. Therefore I read out the vertices (and normals) for each frame. The positioning is fine, but when I try to rotate the gameobject along the normal direction, they sometimes rotate in a very weird way.
I use this: gameobject_to_rotate.transform.rotation = Quaternion.FromToRotation(Vector3.forward, curr_normal_direction);
The gameobject seem to rotate right in the front view - but in the back, they to crazy stuff. Do I need to find another Vector instead of the Vector3.forward?
I am pretty thankful for some help!
Greetz!
Your answer
Follow this Question
Related Questions
Lock Rotation of Child Gameobject 0 Answers
Rotating the player with mousePosition problem. 0 Answers
After Rotating a Prefab, Transform.Position of children is inaccurate 1 Answer
Cloth component not working on inverted mesh. 0 Answers
How to create a rotating floor upon player collision with object? 0 Answers