That would get the right of his character, not specifically the right direction compared to a 3rd person camera.
Multiple rotation value combinations can result in the same rotation direction.
To be safe: Instead of manipulating the rotator values directly. I would try doing
GetRightVector from the
ControlRotation then breaking the vector and remaking it with a 0 in the Z. That way you still have only lateral movement input.
I updated my answer with a screenshot
I am implementing a system like the chisel in God of War. Chisel as a character and in flying movement mode.
When I use the input axis up, it moves upwards. But when I use the input axis right it does not move upwards. If I rotate the chisel character on the level, either 90 or 270 degrees, it works. But not when it is 0 or 180 degrees. It moves very slow when it is rotated in-between angles.
What can be the reason for that?
Have you tried taking right vector from the actor?
I have rotated the actor 90 degrees and changed Get Right Vector with Get Forward Vector, it gave the same result.
Now I just printed strings for right vector: X: 0, Y:1, Z:0.
It’s hard to know what someone is doing with a character, there are so many place to check and uncheck boxes to do with inheriting and ignoring rotation…
When the chisel is possessed, there is a fixed camera for it, in the level.
Don’t zero the Y ( read again )
I tried everything. No matter what, the chisel only moves in the 0-180 axis within the level regardless of the relative angle. Never to the sides of the map.
Could you please share a screenshot of how it has to be blueprinted?
Like in Ben’s diagram.
Yeah, we need to know more about your game setup.
- Is this a topdown game? 3rd person? 1st person?
- Is the Camera fixed, or can you rotate it?
Okay, now I did just as in the latest updated screenshot. It didn’t work either.
For some reason, the character is not moving within the level, horizontal in world space.
It moves up/down, forward/backward, but not left/right. When I rotate it 90 or 270 degrees, this time it moves left/right, but not forward/backward which is horizontal in the level.
I tried both with a gamepad and keyboard.
Attaching a screenshot to show better.
It’s basically impossible to tell from here.
If you make a new empty project, migrate the character to that project, zip it and put it up for download somewhere, I’ll take a look. But apart from that, I’m afraid you’re stuck with reading a lot about character control and vectors.
PS: I only have 4.27, so anything <= 4.27 is good.
Here’s the link: https://we.tl/t-dfuZkL5tDe
I’ve placed five sets of these BPs in the level. Some of them are working, some of them are not for an unknown reason, like in my actual game level. Some of them work when rotating at any direction, some of them work on no direction, and some only work at certain rotations.
I’ve put the link on ClockworkOcean’s message. It is a 1st person game, but when interaction with the panel, there is a fixed camera. Please check it out.
I did a work around. I made an actor blueprint instead of the old character blueprint, and used add actor local offset node instead of the old movement inputs.
However, the chisel (actor) now moves and stops instantly while it used to move smooth because of being in fly movement mode before. If there is a way to make the movement smooth on add actor local offset node, that would help a lot.