Hi guys,
I am a newcomer when it comes to Unity3D. I am a self learner, but now I need some help witch my problem. Here is the problem:
I have two characters at the moment, one is the main character which is controlled by the user and the other one is a NPC. They both have the same animations but different animator graphs. The problem is, that my main character is somehow floating when he’s standing or moving around. However as soon as he attacks or guards, he suddendly bounces back to the ground as he should be anyways. I tried looking for similar issues and found that you should change the offset in the navmesh agent, but that did not help. The strange thing is that the NPC which has the exact same animations is working perfectly fine without floating around.
-----> See screenshots
I’m not familiar with navMesh so if that’s the issue I can’t help. However from the standing and guard picture given it looks like the characters are slightly different heights which suggests you’re changing the character controller’s height to achieve this?
To provide proper help we’re going to need to know which variables you’re changing in your animations. Also a couple of debugging questions:
- Are the graphics on your character on a different gameobject (child) to the controller object (parent)?
- Are you applying gravity in the character movement script?
- Does your weapon have a collider? Is that collider a trigger or a normal one? i.e. is the sword or shield making the player float?
Thanks guys,
I reviewed your suggestions when I realized that the character controller box was causing my character to float . I had to change the Y-positioning so that it was compensation the height difference of the nav mesh.
1 Like