- Home /
How to turn of collision for the player
Hi, I am making a drivable vehicle that I can enter and exit whenever I want, but there's one problem, when I enter the truck it flies up into the air along with the player. And this is because of the collision between the player and the truck, so how do I turn of the collision of the "First Person Controller" prefab?
Different ways. For expample CharacterController.detectCollisions = false That's the easiest i guess
Answer by joonturbo · Nov 16, 2013 at 05:47 PM
You should put your objects on different collision layers, and then customize their interaction in Edit > ProjectSettings > Physics
in code you can just use gameObject.layer
(not transform).
Put the Car and Player on different layers that don't collide the moment you start the enter-car-animation.
Well, I've managed to use Physics.IgnoreCollision, but thank you.
Your answer
Follow this Question
Related Questions
Make Player Move Slow Over Grass 1 Answer
Help with getting script of another player 0 Answers
Play annimation on collision not working. 1 Answer
Moving Platform Collisions with Custom Movement Script 0 Answers
Help with a chasing script 2 Answers