Download

True FPS camera issue

Hello there :slight_smile:

I’m trying to make a true FPS character with a camera that follows the head movement when a specific animation is played or uses the default control with bUsePawnControlRotation for idle and walking/running animation.

For now my character has a camera component attached to the head socket. The camera movement is controlled by the option bUsePawnControlRotation set to true.

I noticed that when this option is true the camera doesn’t follow the head.

Because of that, when I play my animation, I set the value bUsePawnControlRotation back to false and during my animation the camera follows the head correctly but when I try to go back to bUsePawnControlRotation = true (when my animation is finished), I notice a really uncomfortable camera lag that I’m not able to fix.

Throught my BlueprintAnim I’m using the event notify system for setting bUsePawnControlRotation to false and true when my animation begins and ends.

In this video at 0.20, the camera seems to follow the head during a cinematic. This is exactly what I’m trying to achieve! But when the animation is finished I want to go back to normal camera control. And with the system I’m currently using, the change of control is making no smoothed transition of the camera.

Thanks in advance for your help ! I’m stuck for a couple of months now.

My suggestion is to scrap this.
leave the camera for the gameplay as it is, if it works for you. And transiton to a second camera for the animation. Back/forth.

notifies aren’t necessarily always fired so you could be creating a bug.
If you need to be sure the event fires back you should make it all happen off the first notify. So if it fired it will undo itself.

Notify > change camera > delay in seconds > change camera back.

You can have a look at my camera tutorial for some options on how to best transition in/out.

Just lock the second camera to the head bone. Depending on things you may not even need a spring arm.

DynoCamera: DynoCamera - YouTube

Thank you for your quick answer!

Yes, I didn’t think about using two cameras.

I’m goint to try using one camera for the basic movement and another one that follows the head to handle cinematics and other specific animations. I’m going to use S****etViewTargetWithBlend() to smoothly switch between them. It should work !

I’ll keep in touch to let you know if it works for me.

Hello again,

I’m currently not able to switch between two camera at runtime. I’m using Activate() and Deactivate() to switch between two cameras but I still notice the uncomfortable camera lag. I don’t see any function to smoothly switch between two camera components. **S****etViewTargetWithBlend() **is only usable with actor.

Thanks for your help,

Refer to the tutorial, its explained in there. They only last around 30m each.
you can probably skip to the one where I show to to switch from 3rd to 1st person view.