You can detect which sprite is higher than the other by comparing sprite A’s y-value with sprite B’s. But you can be higher than another sprite without being completely above it (so that if you were to pass in front of it, no contact would be made). How can I detect if a sprite is completely above another?
What do you mean by "completely above"? Do you mean directly above where the x positions are the same (or close)?
I mean that if the sprites were on top of each other (at the same x position), sprite a would be sitting on sprite b’s head. So the lowest Y of sprite a should be the highest Y of sprite b.
will probably be useful. It also has options for left, right, and bottom.
Try this block (wont work for turtle sprites):
![]()
That’s exactly what I needed, thank you.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.