kontra icon indicating copy to clipboard operation
kontra copied to clipboard

Feature: Allow Sprite to be a circle

Open crhallberg opened this issue 2 years ago • 5 comments

Drawing and collision done.

Closes #317.

crhallberg avatar Oct 21 '22 17:10 crhallberg

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!

crhallberg avatar Oct 22 '22 20:10 crhallberg

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.

crhallberg avatar Oct 23 '22 19:10 crhallberg

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.

straker avatar Oct 24 '22 14:10 straker

@crhallberg Do you need any help with the pr?

straker avatar Nov 19 '22 16:11 straker

I'm just busy at the moment. I'll take a look soon and let you know!

crhallberg avatar Dec 09 '22 20:12 crhallberg

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

straker avatar Jun 22 '24 00:06 straker