So in my game, I have a wall with a star in it (3D), I would like to allow the player object, also a star, to be able to go through this wall if it fits through the green star.
If the star is positioned like this, it will not pass through, however if it is positioned like this:
it will pass through. Thank you
You’ll probably need a mesh collider with a hole in form of your star, but with some offset to allow the star to pass.
I don’t know if is there any other fancy way to do this
I wouldn’t myself mix physics to this kind of thing, unless you want/need to simulate some interaction of the shapes, things bouncing around and colliding and so on.
Why can’t you just define rules, like if a shape is within certain position threshold and it’s rotation along Z-axis (or whatever you want it to be) is within certain rotation tolerance, then you flip a boolean that the shape matches. After that you trigger animation, perform movement or do whatever is needed.
A triangle can be in the same orientation but with 3 different rotation values as it is equilateral, I’m not sure how I can compare the rotation along the z-axis as the rotation itself could be 60, 180, 300 etc.
Well, then you can make some special rules for the triangle.