kontra
kontra copied to clipboard
Feature: Allow Sprite to be a circle
Drawing and collision done.
Closes #317.
Awesome feedback all around. I figured there were going to be deeper parts of the system that needed to be touched, thank you for laying it all out so nicely!
Looking into these points, I wonder if it may be easier to use width and height throughout like the current objects and only check for radius in draw and collision and maybe keep it updated.
Possibly as a first pass that might be OK. Without the GameObject handling the radius
, any collision checks that involve scale
would be off. But I can take care of that in another PR if you just want to add the initial work of letting a sprite have radius
and drawing a circle instead of a square.
@crhallberg Do you need any help with the pr?
I'm just busy at the moment. I'll take a look soon and let you know!
Didn't hear back from you, so went ahead and did the work in a differnet pr.
Completed in https://github.com/straker/kontra/pull/404