Download

FPS camera + always present shakyness?

Hi guys!

I’d like to have a fps camera that is always shaky. Even when we are not moving around (standard FPS controls).
In theory, the shake would come from a pre-animated helper object which would be attached somehow to the FPS camera which inerhits its random rotations but the ‘looking around the scene’ still works as usual.

How could this be achieved in UE4?

Thanks!

you could probably add the animation to a parent object inside the FirstPersonCharacter blueprint. Similar to how the spring camera setup works in 3rd person.

I did that. Mesh->Sping arm-> fps camera. The camera is moving with the animated object inside the blueprint, but when I start the game it is wrong.
I had to uncheck the Spring Arm component’s ‘Use Pawn Control Rotation’ (under camera options) to make the camera move with the animated object. When the game is started, I can look only sideways and no
animated cam movement.

Any ideas?

have you tried to set the animation to play inside the blueprint, like event begin play > play animation?

Yes. Nothing.
It’s moving nicely with the animated mesh in the FPS blueprint. Not in the game. Only thing that changed is that I loose the ability to look around (only horizontal is allowed).

could you post screen shots of your setup?

Sure.
So here is the fps blueprint. The camera is rotating with the grey mesh that is animated here. The Use Pawn Control Rotation is unchecked (otherwise it’s not rotating with the animated mesh). But this way I loose the default controlled camera movement to look around normally.
I’d like to have the default controls so the camera is controlled by the pawn and I need the animated grey mesh’s animation added to the camera as an extra “anim layer”.
The event graph is the default what you get when starting a new fps template.

screen_my_char.jpg

can you try to put the animated node below the spring arm? (probably not it but wondering if the spring is removing the animation by damping it) Just to test you can also try to make a sine wave function to move that node, to see if anything else can get the camera to move. Also for testing try to add another object not under the root and place it in front of the camera to see if you can get that to animate, to see if the camera itself is negating the animation or if the animation is simply not playing.

Thanks Dave, that helped!
The animated mesh is under the spring arm now and the cam is under the mesh. Now it is moving properly.
I’m off to do some convincing cam animation. :slight_smile: