"Composite Collider 2D" Rotation

Hi,

I was wondering if you could take into account the rotation of the transform of a “Composite Collider 2D”.
I want to use it in the XZ Plane.
I tried rotating the root transform or children, but the composite is always generated in XY Plane.

I also saw that “Collider 2D” can only be edited in XY Plane. Could it take into account transform rotation too ?

Thanks

You cannot use the 2D physics in the XZ plane.

All Collider2D do ‘account transform rotation’ so when you rotate a Collider2D, you are not rotating it into 3D space, it’s always in 2D space in the XY plane. By rotating you are effectively changing the projection of the geometry properties/vertex onto the XY plane.

Rotating a 2D collider such as a BoxCollider2D won’t rotate that into an arbitrary 3D plane because, well, that’s 3D physics and this is 2D physics.

The CompositeCollider2D isn’t any different than any other Collider2D so there are no special rules for it that differs from any other.

Hope this helps.

1 Like