- Home /
Need help with collision detection
Hey there,
I am very new to Unity and i have a problem with collisions. I have a "player" that is First-Person controlled, and i have created a cube that has a box collider attached to it. As for the player, I have tried with lots of different colliders and a Character controller and i still can't get the collision to work, the player just goes right through the cube.
So, my question is : do i have to script collisions(if yes, how do Ii do it?) or am I just forgetting some component to one of the objects?
Answer by Max Kaufmann · May 04, 2010 at 02:42 PM
Colliders are considered static by default. You can indicate that a collider will move around, but not behave like a body, if you add Rigidbody but set the isKinematic flag to true. However, for this to work, you need to move using rigidbody.MovePosition() and rigidbody.MoveRotation() to trigger the constraint-solver.