I am trying to remember how to rotate an actor to face a target location. I did it before, but i can’t remember the nodes or find any tuts that match my needs. Hope someone can help. Thanks
A little more info, I have a cannon ball that is an actor BP with a camera on a spring arm. I am shooting the cannon ball into the air and using homing to get a target. It works great except I want to have the actor face the target which should move the camera to be behind the cannon ball to see it travel towards target. I’m sure it’s simple, I just keep blanking out in my mind on get actor location(target) and set new rotation of cannon ball actor to face target location. Thanks
Perhaps the “Find Look At Rotation” node?
I haven’t been able to get that to work either. Thanks
Not Unless I am getting it wrong.?
Get GetWorldLocation from Canon P and connect it directly into Start. Not the Get Forward Vector.
Ya sorry, I should have put this one up instead of the other one. I had tried that plus many others, but it never works.
1 - how are you driving “SetWorldRotation”?
2 - how are you setting “Target”?
3 - are you getting any errors?
This is my simple setup:
I’ll show more noding below. I shoot a projectile(cannonball) into the air which has a camera on a spring arm. I toggle the view to the cannonball when I shoot it into the air. It rises into the air for 5 seconds then homing takes it to a target selected. As it “becomes homing”, the camera follows the cannonball sideways to the target. I am trying to change the sideways view to be behind the cannonball no matter what target it goes to. Hence the rotate to target. But the camera does not move with any nodes at all. I’m not even sure if I should be rotating the actor(cannonball) or the spring arm or the camera. No matter what I try though, it never changes the actor’s (cannonball) camera position. I do not have any errors.
First is the Cannonball BP - Event Graph
And last is my Homing Target get function
Make a print string of the Target and Canon locations to check if they are the same.
They are not supposed to be the same until homing target takes over, then it is confirmed that it is the same as the cannonball hits the desired target. I would just like to see it from behind the cannonball instead of the side of the cannonball.
You could do this with GetComponentVelocity into GetRotationFromX and use that to setActorRotation
Ya, tried this morning with your suggestion, but it didn’t rotate. Thanks though