Camera snaps back after rotating

I’m trying to build a simple free look camera, but I’m having some problems when I get to rotation.

I’ve mapped mouse x and y to the Yaw and Pitch axes, and I’m using those values to apply a rotation to my camera actor.

When I try this out, the view shifts slightly in the direction I would expect, then “snaps back” to the starting rotation. Something seems to be overriding my rotation, but I can’t figure out what.

I’ve attached a screenshot of my blueprint.

Hey natemartinsf,

you could do it like this:

Is this what you were looking for?

Under your project settings you can set your input axis. After that you can access them in your blueprints by their name.

I’ll keep in eye on this post if you need any further assistance.

Best,

Huppys

That worked great, thank you!

So the problem before was that I was setting the rotation on the camera, but not the player controller?

I think you tried to rotate the camera independently from the player controller. That’s possible and intelligent, when it comes to certain cases.

In your blueprint, I’m missing some kind of user input, like mouse axis input that controls the camera rotation. Maybe it would have worked if you’d set “Set Actor World Rotation” instead of “Set Actor Relative Rotation” for the CameraActor (your node at the far right).

I learned recently that you can get different rotations from a character pawn, depending on that part of the character you are referencing to. You can, for example, get his pawn rotation and his controller rotation. Some characters take the controller rotation to rotate the pawn and his attached components, like cameras and meshes. Some don’t use the controller’s rotation and rotate the camera independently from the pawn. When you keep this in mind it becomes easier to set the correct rotation for another actor based on the rotation of a part of character.

Hope that makes sense.

Best,
Huppys