How can I check if sprite is entirely inside other sprite?
You can first test if one is overlapping and then as a sub-event, you can test if the smaller's bounding box against the bigger one's:
-Sprite1 is overlapping Sprite2
- Sprite1.BBoxTop > Sprite2.BBoxTop
Sprite1.BBoxBottom < Sprite2.BBoxBottom
Sprite1.BBoxLeft > Sprite2.BBoxLeft
Sprite1.BBoxRight < Sprite2.BBoxRight
Develop games in your browser. Powerful, performant & highly capable.
Thank you very much. I didn't think of that.