I’m sure there is a simple way to do this, but I feel like I have tried every combination of
mySprite.add.sprite(...)
mySprite.pysics.add.sprite(...)
etc, and I’m just getting errors…
At a high level, I have one sprite that is an image, but the collision detection is based on the rectangular bounding box. I would like the collision to be based on a smaller oval shape that is closer to the shape of the actual drawing in my image.
My plan is to have the overall mySprite that was created with the png. Then I would like to add a sprite to this called mySpriteHitbox to which I will then add an “invisible” graphic of the oval.
I will then move around the sprite my changing the x and y position of mySprite while using mySpriteHitbox for checking collisions.
Does this strategy make sense? Is there a better way to do what I’m trying to do here, or is this more or less the best way to go?
Thanks!