CharacterController RigidBody interaction

Hi,

When my character, which uses a CharacterControllercomponent bumps into rigid bodies they do not move, as I would expect.

(They interact as expected if I remove the CharacterController and replace it with a rigid body and my own custom movement code)

Is there a way to make a CharacterController interact with rigid bodies (so they bump off each other)?

I've tried adding a rigid body to the character but it makes no difference...

Many thanks

well I guess it could help if you can't find an answer here if you explain how the 2 bodies collided. Is it a physical movement? Or a charactercontroller.Move method? These things can sometimes make a difference and may just be the problem. Just thought I'd mention :) Good luck!

4 Answers

4

There is a dragrigidbody script in this tutorial http://unity3d.com/support/resources/tutorials/2d-gameplay-tutorial use and modify it to suit your needs.

I'm guessing the movement code transform its position. If so add a rigidbody and use addforce to move it instead of tranform.position

Did you mean that whenever you try to push rigid body objects around you can’t move them? Well you have to code your own movement and mouse look script on a particular “player” object so that you can push rigid body objects around. One of the reasons why the Unity team didn’t allow you to push the rigid bodies around using the Character Controller script is because physics dealing with Rigid bodies is very CPU intensive.

What I do is add a collider and rigidbody with character controller to my player and then everything works fine xD. Sorry for several year late answer xD. Just hope for simpler ways.