Player Movement Rotation

Hey! It’s possible to set the player rotation when the main component is the spring arm?

280501-rotation.jpg

Why not place the node rather than ask the question? Or you tried and it does not work as expected?

The simple answer is Yes, but somehow I think you mean something more specific.

Assuming your player is just the springarm + camera, and you’ve made the springarm the root component, rotating this actor will rotate the springarm. Root component defines actor transform.

I tried to use Set Relativ and World Rotation node for the Spring Arm and it’s worked but when the Spring Arm is turned Right or Left the Control isn’t. For example if i Rotate the Spring Arm with 180° than it’s moved to Backward.

if i Rotate the Spring Arm with 180°
than it’s moved to Backward

You lost the ability to give the springarm relative rotation (and relative location) when you made it the root component. Afaik, in this case rotating the springarm is the same as rotating the actor - they share the transform.

This can be undone, you can add a scene component, drag it up in the hierarchy to make it the root and attach the springarm to it. You can then have the springarm face 180 backwards and actor still facing forward 0.

Does it make sense?

If i set the scene component to the top i can’t move.
Here is the movement BP:

And the components:

280522-components.jpg

This looks fine at a glance, you sure the bool, Camera Speed and the vector are fine (as in greater than 0)? Use the debug filter to see what’s blocking the execution path.

I checked everything and nothing blocks the execution path.

Out of curiosity then, what value are you adding to the world offset? Perhaps it’s too small to notice since you multiply it by delta seconds.

The Camera Speed float value is 1500. If you want to know this.

No, the vector that you’re are feeding into delta location. We know it’s > 0 because you said it’s executing.

What I’m saying is that under normal circumstances this should be working. If you tick an actor with delta location != 0, it will move.

I realized that the main Component is moving but not with the Childs. I tried to use a Cube for Parent Component and the Cube is moved so i think the Scene Component is moving too just not with the Spring Arm and the Camera.

Ensure the children transform location is set to relative:

Now it’s moving but not turn correctly just like when the Spring Arm was the main component.

280523-gif.gif

This is the Bleprint:

Sorry, at this point I don’t think I understand what you’re trying to achieve.

You are feeding the actor a direction vector and move it by its magnitude. Your script is moving the object - so that’s working.

Are you trying to inherit controller rotation? Are you trying to move the object along the camera’s forward vector? How is this supposed to work? Perhaps you can describe what you’re trying to do.

I want to rotate the movement direction equal with the components yaw value.

Like this?

Image from Gyazo

You never mentioned rotating the object itself so it’s not included. All on default settings.

Yes, i want to something like this just with a Move Left and Right Input. Can i import these to this Blueprint?

Not 100% sure what you mean but if you do not want to manually control forward movement, hook it up to tick instead and the player only needs to worry about steering left / right.

You can use input mapping + gate + tick but I think this method is just cleaner.

The issue is same as the previous, just now with the Pitch Control Rotating. When i move Left or Right and turn the pitch movement direction isn’t change.

You have a working solution in the image I attached, no? Instead of using input axis to move forward, use tick.

Other than that I do not understand what you need. Sorry.