Old programmer, Newbe UE

so given what I know…
how to attach a class to an actor,
how to get the heading and world coordinates,
how to translate and rotate an actor.

given that I can construct a solution.

create class, assign to actor representing the gargoyle.
I found an AActor method that will find the distance: GetOwner()->GetDistanceTo(GetWorld()->GetFirstPlayerController()->GetPawn())

in TickComponent:
if(Distance < PickupDistance && PlayerPawnYaw ~= AngleToOwner)
{
interpolate coordinates to PlayerPawn while doing a
rotation matrix on the Owner to ensure the PlayerPawn is
always facing the Owner
}
AngleToOwner is calculated: angle = atan2(y2 - y1, x2 - x1)
or ACos(GetOwner()->GetDotProductTo(PlayerPawn))

Somehow you posted in the Blender part of this site, not one related to UE.

oops, lol I have no idea how that happened.

Privacy & Terms