UE4.27
I searched for answers, didnt find a solution.
Player and Enemy share the same BP. Inside is a SK Reference that is 130X units from the center Capsule.
I am using this SK Reference as a visual to know how close an animation needs to be to the Player/Enemy. (And for some reason the SK Ref needs to be 90 degrees off in Editor, to appear correct in Game. So imagine the 2 meshes are facing each other in Game.)
Then I know where this Offset needs to be, and I put it in a DT > Transform information > Location = vector [130 forward in front of Enemy face, 2 to the side, 0 height change] (so I can grab many different anims and the Loc offset they will need).
So in the game, I have Point A (Enemy/Target’s location). And I have Point B which I want to be [130, 2, 0] units from Point A (the Loc that I grab from the DT).
But if Enemy is rotated 95 degrees in game (World location) = a new Point C that I need to solve for, then I need Point B to be rotated 95. What is the math for this?
-
It’s confusing because Im not sure which axis is forward for the Enemy/character in game, vs the SK Ref axis that is using 130 X units, in the Editor setup. Thank you.
-
Also I cant CastTo Enemy BP to get SK Ref > Get live location - because I am Casting to generic Character and Player/Enemy share the same BP.
-
I tried CastTo default Character BP > try to Get the SK ref that I know is inside Enemy child BP, but the editor doesnt find it.
-
But I do not want to rely on the live SK Ref that is in Enemy BP, with correct live location/rotation, because: avoid CastTo. And each Ref location will be different for each Anim > DT row.
PS the tut video is here. But my question is adding to it/different than his tut. But Im linking for others to find since I couldnt when I originally looked.
[How to sync 2 animation locations]