Vector Movement Question

I am making a physics based controllable Rolling Ball (Pawn).

I want it, so that when player holds W (or thumbstick Up), the ball rolls the forward direction of the camera. And the same with all other directions, and their combinations (A,S,D, thumbstick equivalent).

Now since camera can be looking down or up, and I don’t want to apply impulse up or down, I’m making a rotator with X = 0, Y = 0, Z = Camera World Rotation.

Now how can I combine this with the input 2D vector (X and Y with a range of -1 to 1), to make the ball roll in the correct direction?

I tried multiplying the forward vector of that 0,0,camZ rotation with the input vector2D, but it doesn’t work correctly.

Here’s the relevant blueprint section. If you don’t know blueprints it’s ok, you can just explain to me what to do with the vectors.


The forward force will be 0 if looking Up/Down. but Right force will still apply.

1 Like

Works, thank you!

Also I’m a beginner, and I didn’t know that you could add multiple pins to one multiply node, so learned that too.

How did you make your routes look so cyberpunk (straight lines instead of curves)?

1 Like

Happy to help : )

It’s the Electronic Nodes Plugin (It doesn’t really improve the readability for me though, just look cool)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.