#p5js - Weird collision detection
10 messages · Page 1 of 1 (latest)
You need better detection of which site is hit. You can test which corners are the nearest and then decide on this which side it is.
Hmm... I see
so something like
a) find the nearest point
b) Is the x or y closer?
c) x:
xSpeed > 0? right
xSpeed <= 0? left
same thing for y
does that look good @tacit geode?
yayy! i implemented the 'algorithm' abouve
and now it works
but there is some weird things with the angle
Nice