I’m currently working on a project in which I have a dive animation on the character. The animation makes the character move forward when he dives. The problem I’m having is that the pivot point stays in the center of the world (0,0,0), so when the character’s done with the dive animation, he goes back to 0,0,0 instead of going to its idle animation where the dive ended.
Is there any way to modify the pivot point position in unity? We tried doing it in Maya, but since the character is skinned and rigged, the mesh pivot point isn’t affected by the animation and we haven’t found a way to move it correctly so that it works in Unity.
Hello v31ker.
I don´t know if it is possible, so i can´t answer you.
However, i want to ask you about your animation: Did your character remained at the same place when you were animating it? (sorry for my english).
Yeah I saw the SetPivot script. The problem i’m having right now is that my Character object doesn’t have a mesh assigned to it when I export it as an FBX, which is kinda strange. There’s a mesh in my object inside Unity, but it isn’t assigned to it and it looks like the animation takes care of the animation on the mesh.
I’ll take a deeper look at the problem concerning the Mesh in Unity… I don’t get why the pivot point doesn’t follow the mesh in Maya during an animation.
I realized i might have not explained my problem correctly.
The problem I’m having with my animation is that the character’s mesh is skinned and rigged. When I look at the animation in Maya, i see that the pivot point of the character’s bones is moving with him during the whole animation, however the pivot point of his mesh isn’t moving. As far as I know, when a character is skinned and rigged, the mesh’s pivot point isn’t affected by any movements anymore. So, the main problem when exporting this into Unity is that when the character’s diving animation is done, he goes back to his mesh pivot point that stayed where he was at the start of the diving animation.
I’m pretty sure there is a way to make the pivot point move, either in Unity or Maya, but I can’t find any solution to my problem. I need to set the pivot point of the character’s mesh back to where he landed after his diving animation.
It is generally very difficult to write code that compensates for an animation that moves the mesh away from the pivot point. Animations are usually designed so that the mesh stays in place (eg, a walking character looks like he’s on a treadmill), but this might be hard to accomplish with a diving animation. You may not be able to do much better than using trial and error to determine the end position and orientation of the mesh after the dive. Then, you could substitute the rest pose with the same position and orientation, trying to make the join as seamless as possible.