Set Controller Rotation Urgent Help!

I am trying to set the character controller to the direction pointing that of the thumb stick. I can get that all just fine. The problem is their is no Set Controller Rotation which is really stupid, only Add Controller Yaw. Set Actor Rotation works, but it only rotates the character so when I try to move forward its all messed up.

Please, urgent help on getting it all taken care of.

Thanks a ton.

1 Like

I’m not quite following you.
What’s wrong with your character?

Why is this ā€œUrgentā€?

Im animating my character, I am able to move my character around using an Xbox controller. The only thing im having trouble with is rotating the character to a specific angle. I cannot seem to figure it out. I can calculate the Yaw and everything just fine, but I cannot figure out how to actually set the value of the rotation to the character. The only thing I can find is 'Add Controller Yaw" which adds the value, does not set the value.

I was just asking for help, their are reasons its urgent, that’s not really important(Animator is going on vacation and I need to get specific movements done before he leaves). If you could help me that would be very kind.

I am not the expert on movement inputs or rotation but ā€œControllerā€ isn’t really what you are rotating/moving. You need to be moving the ā€œCharacterā€ or the ā€œPawnā€. Basically the actor that houses the player. The controller should house the nodes that tell the character how to move. Try:

Get Player Pawn > Set Actor Rotation

You can use Set Actor Transform too if you want location inputs.

Also, you can try Set Control Rotation or Add Actor Local Rotation though I don’t know their specific uses.

Yes your right about the pawn, and my character is a parent of Character. I can rotate via Set Actor Rotation. The problem I run in to, is that it doesn’t rotate the capsule. So when I move my character forward, it moves forward of the capsule not the newly rotated actor.

EDIT: Figured it out. I had the Get Rotation for the forward direction on the pawn instead of the actor. Thanks guys.

Still Confused about rotation.

So I think that I’m trying to do something similar. I’m trying to make some blueprint code that rotates my pawn so that they camera will point in a different direction. When I rotate my pawn in the editor it rotates the camera in game. When I apply rotation or transforms in a blueprint the pawn via an actor it says it rotates but does nothing to the camera. I can move the pawn and it changes the camera but I just can’t turn it.

What I’m trying to do is point the camera at a fixed point and rotate it are that 180 degrees. So it would be nice if I could just define some path and then have a blueprint that tells how far to move alone that but it is always tethered to rotate to look at the center point while it moves.

But as I’m learning. I’m just trying to do it with some math. If I could get the rotation to respond.

I’m not sure that I understand the forward vector. I guess I follow that you might have a direct that you are going to look out of an actor that is the camera direction. But there doesn’t appear to be a ā€œset forward vectorā€ function even through I see where I can get it.

Help :slight_smile:

Maybe I’m late, but here is solution: get controller -> set control rotation. :slight_smile:

ā€˜A wizard is never late, nor is he early, he arrives precisely when he means to.’

2 Likes

Thanks, Wizard!

It works! Awesome! But I’m not quite sure if it is a proper way to do rotation.