Is there a way to limit what vectors my nodes can travel on?

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

In the game I’m trying to make, I have a unit whose movements I want to restrict to the x axis. I can’t seem to find a way to make this happen? I’ve just increased the gravity for it to ludicrous levels, but that’s only temporary.

:bust_in_silhouette: Reply From: Inces

simply do not write any code, that would move it on Y axis…
You know, in the end, by default all movement is restricted. By increasing gravity You are adding force, that provokes movement. Nullify it instead.