Download

How to make eyes following the camera's movement?

I am trying to make eyes of my character follow where the camera going.
Anyone knows how to do?

Here is the example:

Needs to control only eyes no head!
Thank you! :blush:

Use Find look at rotation node and rotate eyes to the camera direction
To make this rotation more natural you might use RInterp or RInterp to constant(it gives a constant speed of rotating) - it gives smoothness
Here is the simplest implementation of this approach
Oh and don’t forget to set Interp Speed - it defines rotating speed

OMG that looks like a huge mountain in front of a little unreal newbie but I’ll try and let you know!

+Okay, I tried and that worked perfectly with the whole body. but I wonder how to make only eyes following the camera. i tried to find a node for bone location but that was not working! Any angle for me?

(eyes and body are combined mesh and eyeballs have each bone)

If you have bones for eyes you can rotate them Set Bone Rotation by Name | Unreal Engine Documentation
But eyes must be attached to these bones otherwise it doesn’t work.
To find the bone location/rotation of a bone using that Get Bone Transform by Name | Unreal Engine Documentation
You can do a right-click on the return value and split it into location, rotation, scale.


Don’t forget that you need to rotate each eye separatelly

Some additional approaches how to handle it. You can attach eyes to a slot or bone and then control it as you want.
On my project, I’m not using skeletal meshes, but I’m using a mesh with sockets and I can separately rotate turrets and guns on it.
Before I tried using attach a component to a component node, but it has some limitations, much more favorable to use spawn actor and then attach an actor to component nodes. It also good because I can put actor specific logic to the actor that I’m attaching to my player’s pawn

And you probably need to limit angle rotation for eyes, otherwise, it will look awful
In my project, I’m using such logic to limit rotation for my turrets if needed
I’m using vector 2d to set and use left/right angles, in your case I’d use vector 4 to limit rotation left-right and up-down