Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: neowings on April 14, 2013, 09:04:00 AM

Title: Rotation exact 90 degree problem.[SOLVED]
Post by: neowings on April 14, 2013, 09:04:00 AM
Hi,

I'm making AI right now, The Ai is the Robot Guard which is standing and turn 90 or -90 degree to search player. I'm simply using 'Rotate' action with 'Every Frame' option.

To turn 90 or -90 degree, I set 3 degrees per frame because 1 sec is 30 frames. However, it doesn't work well, every time current angle is different.
Is my math wrong?

I searched related problem of get 90 degrees rotation. But my situation is little bit different. The AI has to rotate 90 or -90 degrees and Stop in every time for detecting player. setting with 'Animation Float' and 'Set Rotation' actions are not for my Ai.
http://hutonggames.com/playmakerforum/index.php?topic=2173.msg9572#msg9572 (http://hutonggames.com/playmakerforum/index.php?topic=2173.msg9572#msg9572)


Thank you.
Title: Re: Rotation exact 90 degree problem.
Post by: Lane on April 14, 2013, 09:05:59 AM
use iTween Rotate Add instead.
Title: Re: Rotation exact 90 degree problem.
Post by: neowings on April 14, 2013, 09:35:29 AM

Thanks for reply my question, and I added action "iTween Rotate Add".
But rotating exactly 90 degree is still not working. Probably math mistake of rotate degree per frame within 1 second.

Title: Re: Rotation exact 90 degree problem.
Post by: neowings on April 15, 2013, 09:09:38 AM
Ah ha! I should Turn "Stop on Exit" Check Box off.
Now it works 100% well.
Title: Re: Rotation exact 90 degree problem.[SOLVED]
Post by: Alex Chouls on April 15, 2013, 10:20:25 AM
Hmmm, sounds like a bug. Maybe stop on exit skips setting the rotation in the last frame... I'll look into it...