How to calculate Loc offset of 130 units from Forward vector of Enemy?

Thanks for the replies everyone.
@Roy_Wierer.Seda145 for explaining things about vectors. (And yes my pic was a mess because I was showing other people what I tried incorrectly, but may be related to give you ideas how to solve.)
@illspiritx for the reminder “You really shouldn’t have to calculate lookat”

I knew it was easy, just that I was doing it wrong/ and the wrong order of operations.
So here is what worked for How to calculate the Loc offset of 130 units from Enemy’s *current Rotation (not Forward vector).

  • Note that the code sets the Loc and Rot at the same time, which is glitchy/warps. I’ll need to fix that.
  • I have the Enemy [NPC] rotate to Player first (0.5 sec delay of a Timeline), so that the Ref point attached to Enemy can be calculated before Player runs forward or backwards to be 130 units from Enemy.
  • Edit. I should Calculate how much Enemy needs to rotate to Player, and thus Calc (predict) where Enemy’s Point C should be - before I rotate Enemy - so that I know the Point to place Player - and it’s a better blend/less time delay (visual) to move Enemy and Player at the same time.
1 Like