I have two objects that are interacting in an event. The event triggers when one of the objects collides with the other object. However, I do not want this to happen. I want the event to trigger when the hitbox of one object is completely enveloped in the hitbox of the other object. Thanks in advance!
Develop games in your browser. Powerful, performant & highly capable.
You might want to pin a small sprite(invisible) to each object at their center. They should be appropriately sized so that they only overlap or have a collision when the one object is completely enveloped by the other and write your condition based the center pinned sprites on overlap or on collision.