Are the direction of axes of the base movement are based on the XYZ of the UE?

Hello everyone!
I have a question that “Are the direction of axes of the base movement are based on the XYZ of the UE?”.
Normally, we will set W as scale of 1, S as scale of -1, A as scale of -1, D as scale of 1. But why is that? Why we can’t set A as scale of 1 not -1. If we only change the scale of A and D, we will move opposote direction only on Y axis.
Then, what if UE is using the right-handed coordinate system (on the Y axis, Left is positive, Right is negative), not the left-handed, will we need to set A as scale of 1, D as scale of -1?
In Blueprints API, I found this:
微信图片_20220908093146
Is this one of the proofs of what I am guessing above? Or there is other better explanation?
I would be very grateful to anyone who can answer this question. :kissing_heart:

Direction vector are not really dependent on UEs coordinate system. The reason W is 1 is because we want to ++1 in the direction of the forward vector regardless where its pointing. Same for D and right vector.

If you would pass the value of the left vector and ‘backward’ vector then you could flip the signs and get same result.

Hope it make sense.

Pretend that directly in the middle of your character, there is a stick. your character has a front, back and sides.

By moving the stick forward. (Into a positive number) we move in that direction, because it is the primary vector for front to back movement.

And Right is classified as Positive, because right is the primary vector for turning, or applying velocity to the right or left.

Its sort of like putting a car in reverse I suppose?

This also simplifies the way you can describe, and respond to information in a game, Its happening on the right of the actor, because the vector is positive, so you know what your script will produce an effect to the right, as long as its based off character directional facing, and not the worlds directional facing.

To maybe answer your question, While Character directional Facing, and World directional facing do interact with each other, they are still independent of each other.

Your characters X axis, is that actors X axis, it can face any direction in the world. And you can use that directional facing to do things like line traces, without needing to reference the world. (technically not true, if you want to use that line trace for specific reasons.)

2 Likes

I got what you mean.
So, let me push further. If Left of the actor is classified as Positive, then we need to reverse our current setting. Right?

Yes, that would be correct.

Just make sure, that you comment your code, so that if anyone else needs to go in and alter or add something in the future, they will know that Left is positive.

1 Like

Thank you very much for your answer! :kissing_heart: :kissing_heart: :kissing_heart: