With SpriteKit, is it possible to have two nodes that collide with one another, but then when another node is introduced, have how the physics works change?
For example, consider the following 3 nodes:
- Object
- Object_Hole
- Player
So, a scene containing a Player (orange circle) and an Object (blue rect):
In the above scene, the Player (circle) would be affected by gravity and collide with the Object (square). I know how this works by using the physics body, category and collision bitmasks.
Now, introduce the Object_Hole (green square):
In the above scene, the Object_Hole (green square) overlays the Object (blue rect) - this can be on either the same z plane or a higher plane.
Is it possible to make the physicsBody on the Player (circle) not collide with the Object in the area that the Object_Hole is?
If there's a better way to achieve this than adding an overlaying Node, please let me know. Otherwise, is it possible?
Thanks!