I was intending on using sprites to function as hitboxes for enemy and player attacks for the combat system I’m working on, but I just realized that transparent sprites aren’t considered when the overlapping event is called. Is there any way to detect when transparent sprites are overlapping with another sprite? If not, is there another built-in way I can achieve a similar effect? I’m not too keen on making my own collision system
.
Use location instead?
I.e: Player overlaps Sprite AT COORDINATES (get player coordinates to compare to hitbox sprite)
Share your project and I’ll have a closer look ![]()
There will probably be a simpler solution. I’d just like to see what you’re dealing with ![]()
In case anyone is wondering, I was doing this because the enemies in my game will have melee attacks, and so I needed away to differentiate between collisions between the attacks and collisions between the enemy itself.
Try making the sprites not transparent… just colour them in with one colour or something to help you remember that they’re just hitboxes but I think that should solve the problem.
Unless is there some important reason that you want them to be transparent?
(when you say transparent I assume that you mean you have left the image asset blank.)
Similarly, you could try making them invisible instead of transparent. Invisible sprites still invoke overlaps.
Thank you so much! I didn’t even know you could do that
(set the sprite flag to invisible for anyone who is wondering)