Dear Community,
I have been working on the basic animations in my game and I have set up a very basic locomotion animation for my player character (Idle / walk / Run / strafe).
I want to implement an additional feature into it, when the player is nearby an item that can be picked up (actor already implemented), the model would turn it’s head towards the actor.
I’ve seen guides for NPC turn their heads towards the player, see example:
https: //www.youtube.com/watch?v=FxyRzooc-lM
I tried to create my own event graph for this, but after many tries I am unsure how can I call the actors location in the animation event graph. I searched for hours, but I couldn’t find any relevant guides. This looks fairly simple and understandable to implement on NPC, but I need the player character to do the same.
For example: Player walking by a crate, with a medkit on top. As the player gets nears, the model turns its head to look at the medkit, and back to normal after passing by (I think SH2 had a feature like this? Not sure).
Could you please help what i need to add / replace based on the video to call the actors location? Thank you in advance.
(Attaching screenshot of my basic setup).