How to make the character always look on player

I have already made Aim Offset and AnimBP, I only need to make the character turn his head while watching the player. (Head can turn on 360 degreces)


Hey @Metallic_emperor!

You should be able to do this using “Find Look At Rotation”, and then breaking the struct rotator pin to use the Y and Z values!

Just plug in your first location (something to do with the head, I’m sure) to the start pin and use those Y and Z outputs! :slight_smile:
image

Give it a try and let us know how it goes!

It doesn’t work the way it should


Sorry, can you elaborate? In what way is it not working as intended?

Also can you show your blendspace implementation on your Animation Graph with the AimOffset? :slight_smile:

  • The head of this character should always be looking at the player, but when I did as I described above, he does not look at the player

Sorry, miscommunication.

The Animgraph is the one that looks like this:

So where your aim offset is on this graph!

Problem soved

Hey, that’s great @Metallic_emperor!

Can you let us know what you did for future answer seekers? :slight_smile:

In short, I redid the Aim OffSet, now there are values from minus to positive, that is, -180 and 180 for the horizontal axis. and also added a couple of new animation states.


Awesome! Thanks for putting that up, chances are it’s going to help somebody down the road!

I’m going to go ahead and close this one out. :slight_smile:

A small correction: it is better to use find look relative at rotation

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.