I’m trying to make my character to look at some of the in game objects, for that first I’m doing “SphereTraceForObjects” then from HitResult storing “HitActorLocation” as variable, then from Character “AnimGraph” giving that location data into the “Look At Location” input in “Look At” node. And from the “Bone to modify” option by selecting the “Head” bone option I’m expecting to make my character’s head turn around to that specific objects. But it is not working. It seems like character’s head is always facing at “0,0,0” origin. Here are some screenshots -
I think with the way you have your graph, you have to invert the location of the actor that was hit. I had the same issue trying to get the AI to look at the player.
Hi dblzeero, thank you for your reply, inverting the location of the actor didn’t help. All I’m doing is with the “ThirdpersonBP” tracing some objects(Actors) in the world and then trying to feeding that location into the “Look At” node, but it is not working. Surprisingly first time when I did that with the same blueprint it did work for the one child actor, but now it is not working anymore. I’m not sure if I should use a “EventTick” instead of Custom event. I’ll be checking that.
Hi @PunchYou!
From your screenshots, it looks like you’re only setting the Hit Actor Location variable in the animation blueprint on the Begin Play event. This will happen once and not continuously, thus keeping the value at whatever it is set initially and your character stuck looking toward the same location.
You may want to set it on the Update Animation event instead.
Good eye.