Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: plinm on August 22, 2017, 05:05:42 PM
-
Hi there,
I am using GetAngleToTarget action to calculate some angle between two objects, and then use the angle to do some other calculation, but the GetAngleToTarget action is NOT performing the calculation in OnEnter which means by the time I use it, the value will be the 0 (default).
I don't think that's the intend behaviour of the action and it does not mention anything in the tooltip or documentation.
-
Hi can you try the one in the attachment below
-
Hi,
tricky...
the problem with this is that to get the right up to date angle, it has to be performed on LateUpdate.
but in case where GameObject are settled in place and did not move during the frame, then computing on Enter works yes.
If GetAngleToTarget2 works for you, We'll put it on the Ecosystem I guess.
Bye,
Jean
-
Thanks,
I fixed it by making a custom action, BTW, the script you attached is the same with the original one.
-
Hi,
Oops, Copy/Pasted the wrong one :)
updated the attachment in case any one else needs it
-
Hello Plinm.!
I am having the same problem as you. I just updated playmaker to 1.8.5 and due to the lateupdate changements, I can no longer make my GetSignedAngleToTarget work...
Could you please share your custom action, or guide us about how you fixed it?
Edit : I also had a custom action same as the get signed angle, but verticaly. Might be usefull to share ;-)
-
Hi,
with the new 1.8.5 you need this now to handle properly lateupdate:
public override void OnPreprocess()
{
#if PLAYMAKER_1_8_5_OR_NEWER
Fsm.HandleLateUpdate = true;
#endif
}
I checked and the action on the ecosystem was updated to account for this, so simply get it again from the ecosystem ( click on update if the entry is green) and it will then work.
let me know.
Bye,
Jean
-
Hi jean!
I already started to manually add the correct elements in my actions when I need to use lateUpdate thanks to your topic on the what's new section.
Thank you for the help!
-
Hi,
Let me know if you find a custom action on the Ecosystem that needs updating, I think I covered all and edited them all but I may have missed a few.
Bye,
Jean
-
Sure thing! I'm fine for now but if in the future I download an action and it doesn't work, i'll warn you right away!