Hey everyone, I’ve got another one of those silly and obvious problems, and once again I can’t seem to find a solution online… Basically, I wanted to implement a free-look feature to orbit the camera around the character while they are in the idle state, and I actually managed to get that working. However, when I try to make the character rotate to match the camera’s movement, it just won’t work(Just to clarify, what I mean is that when the game starts and the character begins moving, the camera remains unlocked.). All the screenshots are below (including the code, if that’s relevant).
P.S. Thanks in advance for the help, and sorry for the trouble!
To make character rotate with the camera again set the bool on character movement for Use Controller Desired Rotation to true on move input started.
Use Controller Desired Rotation doesn’t work with Orient Rotation to Movement, so you may want to make a function to toggle both of them to quickly swap turn modes.
I know that Use Controller Desired Rotation gives the desired behavior, but I don’t think it’s exactly what I need, because when the character is idle, the camera still rotates. As for Orient Rotation to Movement, if I understand correctly, it only rotates the character when they are actually moving.
I can certainly figure out how to write a custom function for this, but I’m curious as to why Orient Rotation to Movement doesn’t work as intended, or if I’m just misunderstanding how it’s supposed to work. I’d really appreciate it if you could shed some light on the details. Anyway, thanks again for your reply and for taking the time to help!
In my own game I turn on Orient to Movement when weapon is put away and swap to controller rotation when drawing weapon (or entering combat stance if unarmed) so I also have vanity free cam when moving out of combat.
@illspiritx It seems a lot clearer now. Orient Rotation to Movement is used to visually rotate the character based on WASD input and doesn’t affect rotating the model to face the mouse direction, whereas Use Controller Desired Rotation is exactly what handles rotating the model to face the camera. Do I have this right now?
P.S. Given this, I could just set Orient Rotation to Movement to false. I’d still be able to orbit the camera around the character, and then set Use Controller Desired Rotation to true when I start moving, or am I missing something again?
Yea, you don’t really need to turn on orient to movement for camera control, I mainly just do that so I can also have freely orbiting camera while moving out of combat.
Might want to wire that set true node to to the started pin on input event tho, so it’s not spamming the bool every frame when moving.