Rewrite rope #11
@ -1103,6 +1103,11 @@ function rope:_drag1(n1,ax1_new,ay1_new)
|
||||
local ax0,ay0=n0.ax,n0.ay
|
||||
for _,anchor in level:anchor_points() do
|
||||
if
|
||||
-- NOTE: Do we need to look at the new path too? Something
|
||||
-- just feels wrong about this check.
|
||||
-- Really our goal is to figure out if moving the end of the
|
||||
-- path crosses over the anchor, which feels like a point/triangle
|
||||
-- collision
|
||||
_in_box(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) and
|
||||
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_old,ay1_old) !=
|
||||
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new)
|
||||
|
Loading…
Reference in New Issue
Block a user