- Home /
Colliders attached to objects on separate layers are colliding?
I have objects that I have on a layer that I use to be collided with when raycasting, and then I have objects another layer that is used for physics collisions. The objects on the physics layer are colliding with the objects on the raycast layer instead of going through them. How do I get the colliders for the objects on the physics layer to ignore collisions with objects on the raycast layer?
By default, different layers collide with each other. If you want to specify layers that should not collide with each other, do so at the physics settings like @mattssonon explained below.
Answer by mattssonon · Nov 06, 2013 at 04:12 PM
Go to Edit -> Project Settings -> Physics. Use the collision matrix to set up collision between layers.
Your answer
Follow this Question
Related Questions
How do I use layermasks? 9 Answers
Is it possible to allow a raycast to pass through a collider to hit things behind it? 6 Answers
LayerMask for RayCast 1 Answer
Why is Physics.Raycast returning colliders in a layer not included in the layermask? 2 Answers
Returning list of Triangles, Vertices or Points by raycasting through a mesh (iPhone) 1 Answer