Blueprint: Getting an object to LOOK at another object

Hello!

You have to make a blueprint that makes the mesh or actor rotate to look at the target location or actor each tick like NukePie explained. The math part is luckily done by UE! :slight_smile:

Something like this should work:

If you are trying it in code:

//Calculates the lookat rotation from direction vector
FVector direction = FVector::ForwardVector;
FRotator lookAtRotator = FRotationMatrix::MakeFromX(direction).Rotator(); 

If you are trying to make a skeletal mesh look at a target (like aiming) You should take a look at this documentation: [Creating an Aim Offset | Unreal Engine Documentation][2]

I hope this helps!

Elias

1 Like