hi,
i am having trouble trying to make my character move and react to collisions.
I created an “empty”, set a characterController on it.
Inside this empty i added a rigidbody to the character, and a box collider otherwise the character went through the plane below it.
Now, onCollisionEnter is called directly when i start the scene, how should i just combine a characterController with a rigidbody and a collider?
Also, when i set the dimensions of the charactercontroller “box”, it looks ok, then i set the dimensions of the box collider, but when i start the game, the two of them change their position (like a bit on the right for the first, and a bit to the front for the second one…) Would you know why?
If i set the player to “isKinematic”, and the enemy (a cube with a rigidbody (no-kinematic) inside an empty using a charactercontroller), the print in OnCollisionEnter does not show up.
When i set the position in Edit mode :
When i click on start, and reach the cube : the boxes are not located as before in edit mode, and when i touch the cube, nothing appears in the console :
function OnCollisionEnter(collision : Collision) {
print("test");
}
Thanks for your help