- Home /
Special Collider?
how can i make a collider for a cube which the player can go through but the cube can't move through another cube?
Comment
@InfinBuzz - Good recommendations. Consider converting to an answer.
Best Answer
Answer by InfiniBuzz · Jul 06, 2013 at 02:10 PM
Physics.IgnoreLayerCollision(specialCubeLayer, playerLayer, true);
specialCubeLayer and playerLayer are the layer numbers of the objects. Useful if you have multiple objects on both layers.
or in the player or cube script
Physics.IgnoreCollision(cubeCollider, playerCollider);
cubeCollider and playerCollider are the collider components of your objects. Useful if you have one specific cube and one specific player
this will make the physics system ignoring collision between these two objects