You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If radius is passed to sprite, draw circle instead of square.
Sprite({x: 0,y: 0,color: 'red',radius: 5});
Additional this should allow collision detection between circle vs circle and circle vs square. Would also need to look through the code to see what other things may break / need to be updated to handle circles.
The text was updated successfully, but these errors were encountered:
Would you expect x and y to be in the center of the circle or in the corner - which would allow rects and circles with the same x and y to occupy the same space?
This could be done by setting a default anchor of 0.5 when radius is set.
Ya. Ideally the sprites draw position would be the same regardless if it's a square or circle. A centered anchor property would draw both centered around the x/y position.
If
radius
is passed to sprite, draw circle instead of square.Additional this should allow collision detection between circle vs circle and circle vs square. Would also need to look through the code to see what other things may break / need to be updated to handle circles.
The text was updated successfully, but these errors were encountered: