- Home /
Question by
theavijitsinha · Aug 23, 2019 at 05:31 AM ·
2dcollision2d-physicscollision2d
Different platform effector 2d rotations for different colliders
I have a square gameobject with a platform effector 2d component and four edge collider 2d components for each of the sides of the square. All four of the edge colliders are used by the platform effector 2d component.
Is it possible to set different rotational offsets for each of the colliders in the platform collider 2d component. I want to create sort of a trap by only allowing collisions from inside the square, so the player can walk into the square, but can't walk out.
Comment
Best Answer
Answer by Parokonnyy · Aug 23, 2019 at 10:09 AM
Yes, the easiest way which I prefer is to just create 4 box colliders (top, bottom, left, right) which will be the bounds of the platform.