简体   繁体   中英

Character walking through terrain instead of on top Unity3D

I've been trying to add an animation to my character to allow him to walk. I've assigned the animations from Mixamo and rigged my character. Every time I run the game my character keeps going under the terrain at waist height when walking and running although when idle he remains on top of the terrain.

I've added a character controller on him already and checked if it has been placed correctly. I've also included screenshots of how he currently looks. I hope someone could help make my character remain on the scene instead of floating down every time! :)

Thanks a lot!

I dont see the screenshots you have added, however based on my experience;

Usually, character wont stay on the terrain when it's origin (pivot point) is below the terrain itself, Usually to control character, we use Character Controller Component on Unity, If so you need to make sure the controller capsule is above the terrain as well.

Since, you say that you have issues only when character is moving, probably during animation character's pivot point go below the terrain. Post your character configuration for better answer.

Edit: I had similar issue to one of my object today, I added BoxCollider component and it fixed the issue. However I still believe your issue is because of Pivot point

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM