Tag Info

New answers tagged

-1

You just need to rotate direction vector A by angle theta, where theta is angle corresponding to your distance on circumference. Because you know full circle is 2 * pi radians and you can calculate the circle's perimeter. Theta is then distance / perimeter * 2pi radians, simplified dist / len(A). In code: double theta = distance / A.Length(); vec2 dirA = A ...


1

For completeness, I'll document the "reinventing the wheel" approach. I recently wanted to do this too, but I wanted to do it statically (due to some code-structure decisions made before that I didn't want to break). So I didn't want to create a sensor body and World.Step, as previously suggested. Instead, I figured that a convex polygon intersects with a ...



Top 50 recent answers are included