0
votes

enter image description hereProblem: Imported model with Rigidbody and (later added) capsule collider ignores physics and collision with terrain, while other models with colliders work as intended.

Summary: I'm working with the robot kyle model/rigging free asset from the unity asset store. I added an animator controller with idle, walk, run, and jump animations and a simple script for movement. No custom physics scripts attached. I have a ball in the scene with a sphere collider and it works as intended with terrain collision and gravity and projectile motion.

Edit: I discovered that deleting my animator controller entirely and deactivating the animator in the inspector causes the model to fall onto the terrain as intended on play (only works with added capsule collider on), but turning back on the animator (with only an idle animation in the new animation controller) causes the model to float while doing the idle animation.

1
Shouldn't Is Trigger be true?krobelusmeetsyndra
Make sure the Rigidbody is coving the model, also adjust the radius and height . With the floating when animator is enabled set apply root motion false.Levon Ravel

1 Answers

1
votes

You should make sure that movement is conducted via the rigidbody component and not by the transform component:

rb.MovePosition(transform.position + transform.forward * Time.deltaTime);