- Home /
first person controller with interaction
Hey everybody,
I'd like to you know the "first person controller (FPC)" could move an object when enter in interaction with it?
For example if my character hits an object such as a stool, I would like the stool to move or fall down.
It doesnt seem that hard but Ive been working on it for a long time now. I ve been tryin different script and free project I ve found but nothing works properly. plus, adding a "Rigidbody" to the FPC's capsule collider doesnt work.
If you have any idea it would be great.
thanks
Answer by Alec-Slayden · Apr 29, 2011 at 02:10 PM
The character controller doesn't act like a physical object. However you can use OnControllerColliderHit() to detect a collision and then manually create a force that acts upon the hit object.
Alternatively, I've had some success with creating a "bumper" kinematic rigid body collider that ignores raycast and collision from the controller layer, and putting this inside the character controller, so that it's always in front of the player (or you can make it a tube going around the player).