Rewrite rope #11

Merged
pyrex merged 12 commits from rewrite_rope into main 2022-12-21 05:44:16 +00:00
Showing only changes of commit 675ef20115 - Show all commits

View File

@ -1103,6 +1103,11 @@ function rope:_drag1(n1,ax1_new,ay1_new)
local ax0,ay0=n0.ax,n0.ay local ax0,ay0=n0.ax,n0.ay
for _,anchor in level:anchor_points() do for _,anchor in level:anchor_points() do
if 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 _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_old,ay1_old) !=
_which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new) _which_side(anchor.ax,anchor.ay,ax0,ay0,ax1_new,ay1_new)