- Home /
Question by
hiimjohn · Jan 05 at 10:30 AM ·
movementontriggerenter
How to tell if which object is moving into another?
There are two objects A and B both of which can move up and down and left to right. How can I tell for example that when object A is moving down and object B is below it and is moving right that it is object A colliding with B using only information in OntriggerEnter2D. I also have access to both objects. The converse can happen where object A is moving upward and is to the left of object B. Object B is moving leftward and collides with object A. In order to make this more clear, it might help to imagine the objects as incredibly large.
Comment