Download

How do you animate eyes from npcs.

How do you animate the eyes of an npc character, to follow the main character?
Is it a script thing or a animation thing?
Im new here :3

I use a bit of both.

I’ve been experimenting with character animation using Michael 7 from Daz Studio and I started with the “look at” functionality.

In basic terms I created a function which takes in a simple vector which is the world location of the target you want to track. The function then calculate the look at rotations for both the eyes and the head/neck. It does some other stuff like limiting the rotations so that the head and eyes can’t rotate unrealistic amounts etc.

I then pass those 2 rotations to the animation blueprint for the character which simply applies the rotations to appropriate bones using the layered blend per bone nodes. It also applies some subtle morphs to the eyes lids etc.

how you do it depends a bit on how your character is set up. If you don’t have bones for the eyes then you could use morph targets.

The skeleton for this character has a bone for each eye and I’m also using the head and 2 neck bones for more realistic head tracking. The eyes and the head both track the target but at different speeds. The eyes track faster than the head. In the second half of the video I’ve slowed the head tracking right down so that the eye tracking is more noticeable.

https://youtube.com/watch?v=bskAs_E3TYk

Fantastic! Are you planning to share this? I’m trying to find a way to get a look up/down animation so I could create an aiming system for my side scroller game, like in this video: https://www.youtube.com/watch?v=KXvTgEAaQyQ

The problem is that the animation from the Animation Starter Pack, was made for use with characters that uses weapons, the problem is that my character doesn’t have any weapon, so I’d like to find a way to animate only the head to look up or down.

Unfortunately I can’t share this project because it contains a Daz Studio model and would go against their terms and conditions. I also think this setup would be overkill for what you’ve described. i.e. a side scroller.

Instead I’ve made a quick modification to the standard side scoller template to illustrate how I might begin to tackle it: https://drive.google.com/file/d/0B9v4I8psF8qPS1Z1V3g3WlppOGs/view?usp=sharing

I’ve only modified the character blueprint and the animation blueprint (event and anim graphs)… oh and I added another mouse input for up/down look rotation.

P.S it’s in UE 4.9

This is really awesome, I didn’t know that it was even possible. Thank you so much!

P.S: It’s also working in UE 4.10.

Hi Alkemistic,
this is exact what i am searching for!
Can u please help me? Please send me a picture of the Blueprint from your first Demo Movie !?
I stak in the Bone control of e Character Bone…

Thank you for answering :smiley:

@Alkemistic I’m clearly several years too late to this party, but I keep running into dead ends trying to do EXACTLY what you just showed! I was so sad to see the link no longer works. do you have the ability to repost an updated link??