Tweak collision detection to detect top surface last, making bugs harder to squash
This commit is contained in:
parent
de35a23a6c
commit
cb6f60739d
|
@ -502,10 +502,10 @@
|
||||||
(three-corners top-left size))
|
(three-corners top-left size))
|
||||||
(for/or [(p (in-list (list top-left top-right bottom-right bottom-left)))]
|
(for/or [(p (in-list (list top-left top-right bottom-right bottom-left)))]
|
||||||
(or
|
(or
|
||||||
(and (segment-intersection-time p r touchable-top-left touchable-top-right) 'top)
|
|
||||||
(and (segment-intersection-time p r touchable-top-right touchable-bottom-right) 'right)
|
(and (segment-intersection-time p r touchable-top-right touchable-bottom-right) 'right)
|
||||||
(and (segment-intersection-time p r touchable-bottom-right touchable-bottom-left) 'bottom)
|
(and (segment-intersection-time p r touchable-bottom-right touchable-bottom-left) 'bottom)
|
||||||
(and (segment-intersection-time p r touchable-bottom-left touchable-top-left) 'left))))
|
(and (segment-intersection-time p r touchable-bottom-left touchable-top-left) 'left)
|
||||||
|
(and (segment-intersection-time p r touchable-top-left touchable-top-right) 'top))))
|
||||||
(let ()
|
(let ()
|
||||||
(match-define (vector left top) top-left)
|
(match-define (vector left top) top-left)
|
||||||
(match-define (vector touchable-left touchable-top) touchable-top-left)
|
(match-define (vector touchable-left touchable-top) touchable-top-left)
|
||||||
|
|
Loading…
Reference in New Issue