Curved(or Steering) Line2D in Topdown.

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By HorseGorilla

For example, in the case of Isaac’s ‘Brimstone’ item, if you move the player after shooting at the target, it will bend slightly (example below).

https://drive.google.com/file/d/1ZjOLjVZALwPSprByJPqKmBAVIod-r28d/view?usp=sharing

If so, is it correct to use the steering to find the position of each point and then connect them?

The method I did now is to find the collision point of the wall using RayCast2D in physics process, then set the position using Position2D(Green dot) and give a slight time error through linear_interpolate(Blue dot). It was done multiple times.

https://drive.google.com/file/d/1x0S7_64jdu7IEafFQxANl39arNtqyrmB/view?usp=sharing

However, I limited the drawing of points to 0.05 seconds (or less) every second through yield in the for statement, but I did not get the result I wanted. Sorry for the long post. Any help would be appreciated.

I’m also sorry for my poor English.

Did you tried to use 2d joints? (https://www.youtube.com/watch?v=p6HaqSVbkUw)

AlexTheRegent | 2022-06-20 08:36