Use tween/path2D/curve2D for a dodge move

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dahaarl
:warning: Old Version Published before Godot 3 was released.

Hey !

I’m trying to do a “dodge” move like that:

I tried with a keyframe animation but I want the movement to be relative to the player position so it was not the right way.

Later I tried with a tween but I can’t do a “circular” movement as on my diagram with it.

I think that I should use a curve2D but I don’t know how to use the same curve2D for the left and the right movement (1 curve that facing player’s input direction).

Having two curves each side of the player will be another solution but I don’t know if it’s well optimized for a 2D fighting game…

Maybe you guys will have some other ideas !

:bust_in_silhouette: Reply From: kidscancode

See here for a solution using tween: https://forum.godotengine.org/14993/how-can-i-achieve-set_pos-as-a-parable-with-tween-node

Thanks a lot ! I searched on the net but didn’t use “parable” as a keyword ! Thanks again ! :wink:

Dahaarl | 2017-11-27 17:01