Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | lulavin |
so, i tried a heartbeast tutorial, and instead of doing it in gdscript like a normal non braindead human being, i decided to do it in c#. i got stuck on the second video where acceleration is used for a character because it says that the function MoveToward
does not exist. here’s what i tried:
public void applyAcceleration(float amount) {
velocity.x = MoveToward(velocity.x, 50 * amount, 20);
}
and the code in the video was:
func apply_acceleration(amount):
velocity.x = move_toward(velocity.x, amount * 50, 20)
thank you in advance.