r/howdidtheycodeit • u/FoamBomb • Jan 30 '24
Question How are the web collisions coded?
Enable HLS to view with audio, or disable this notification
684
Upvotes
r/howdidtheycodeit • u/FoamBomb • Jan 30 '24
Enable HLS to view with audio, or disable this notification
View all comments
Show parent comment
12
u/SlothWithHumanHands Jan 31 '24
no need to do more of a less accurate thing — you can sweep a line into a quadrilateral and calculate a parameter t that finds the exact intersection with a polygon. for thread unwinding, a negative dot product of current thread and most recent incident thread perpendicular would indicate when to collapse into a free thread.