3D Movement Vector

Often, when trying to do character movement control, you'll want to create a 3D movement vector. It should return the strafe (left-right movement) in X, and the move (back-forward) movement in Z.

Then, you'll want to multiply it by a speed. This speed could be different depending on whether the player is walking on running.

To create such a vector in Bolt, you could use the following flow graph:


Then, you could use it as a super unit:


This article was helpful for 25 people. Is this article helpful for you?

+2

IĀ figured this part out myself, but I'm having trouble getting the input axis relative to the camera.

+7

If someone needs setup for FirstPersonController here is a basic setup with movement and orientation.

gameCamera is a child of mainPlayer gameObject.

Hi, I try following your diagrams, they work but I cannot change the "self" in transform to mainplayer and maincamera, the option appear blank.

Having the same problem - can't work it out.

I'm very stupid. The machine needs to be set to embed rather than macro in order to reference other objects in the scene.