- Home /
How to make collision with moving CharacterController and moving Collider.
Hi,
I'm trying to create a third-person action game and use a CharacterController for my player gameObject and there are a cube with a box collider which moves like piston.
The player can collide with not-moving face, top and 2 sides, of the cube, but the player can pass through the cube along the moving. For example, if the box moves along with X-axis, the player can move through it along the X-axis.
How can I make them along the collider-moving axis?
Answer by Aurelio Provedo · Apr 13, 2011 at 01:44 PM
Have a look at the 2D Platformer tutorial. There you can see scripts for moving platforms, and how the collision events are implemented in order to push the CharacterController.
Thank you for your reply. So should I write codes for the collision event to push the player, not automatically?