Set collision layer for colliders

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dzejkob

Hello, i need set 2 different collision layers for one rigid body, this is traffic cone and i want block collision of 2 of them from wider side but i need be able to stack them. THX

picture

What’s your question? Have you done this and it’s not working as expected?

kidscancode | 2019-11-25 16:53

I dont know how to make scene for this rigid body. I made this scene but the collision layer is set for RigidBody2D, I need set different layers for CollisionShapes.

myscene

There is what i need made in Unity.
RigidBody with 2 children.
Each child have box collider and set different Layer for collision.

unityc1

unityc2

Dzejkob | 2019-11-26 19:17