Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: serenefox on September 13, 2018, 03:29:39 PM
-
Hi,
I am trying to get my 2d sprite to look at a direction, but it won't work properly. The lookat 2d action works but I need to to look at a Vector 2 direction instead of just a V2 point in space. Any ideas? I tried smooth look at direction but the sprite keeps flipping around the wrong way not matter what up vector I have.
Thanks!
-
Hi,
You can get the direction by substracting your target position with your sprite position?
Meanwile, I'll if I can make that action.
Bye,
Jean
-
Hi Jean,
I am getting the direction from the “Get axis vector” action. I just need to feed that direction into a “look at” action some how so my arrow sprite will point that way. The problem I am having isn’t getting the direction, it’s that I can’t figure out how to get the look at to work properly.
-
Nevermind I figured it out. I used a dummy parent game object and manipulated that with the smooth look at direction which I did before but apperently not the right way. For 2D I had to change the child object’s rotation to be 270 in the X, 0 in the Y and 180 in the Z.