Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

CircuitPython sprite collision detection?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

CircuitPython sprite collision detection?

by fid on Thu Mar 26, 2020 1:57 pm

Is there collision detection for sprites available for CircuitPython? I wrote my own for detecting if one circular sprite hits a second circular sprite. It uses square roots to calculate the distance between the two sprite points of origin. This is not going to work when sprites are of different shapes, such as Blinky, a triangle or whatever.
I see that this can be done in MakeCode, but I'm wanting to code it in CircuitPython. If it is not available presently, I'll keep figuring it out. Thanks.

fid
 
Posts: 55
Joined: Wed Sep 25, 2013 3:00 pm

Re: CircuitPython sprite collision detection?

by tannewt on Thu Mar 26, 2020 3:57 pm

Unfortunately it isn't available now.

tannewt
 
Posts: 1691
Joined: Thu Oct 06, 2016 8:48 pm

Please be positive and constructive with your questions and comments.