Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: cloud03 on January 12, 2014, 03:15:01 AM

Title: Different Behaviour between PC and Android?
Post by: cloud03 on January 12, 2014, 03:15:01 AM
Hi guys,

I have a problem that I can't solve. I've create a platformer project, and manage to get the character to grab a ledge. The character ledge climbing animation contains a shifting position, and after ending that animation, the FSM quickly offset the root gameobject to compensate the animation offset before, and it work nicely on pc, but on android I can see that the character is skipping its position for split second before it stop correctly.

For offseting back the character so it stop at the correct position after climbing, I'm using translate action, and that action is triggered or sent after the climbing animation is finished, with a delay 0.02 sec in send event action. On PC it works everytime, but on android we can see maybe 2 out of 4 that the character skips and then back (like a glitch)...

Is there a way to prevent this on android or mobile in general?
Title: Re: Different Behaviour between PC and Android?
Post by: jeanfabre on January 13, 2014, 07:27:50 AM
Hi,

 It's likely due to frame rate dependant glitch. I would increase the timing to see if it helps.

Or I would actually try to link the event call based on the end of an animation or something.

bye,

 Jean
Title: Re: Different Behaviour between PC and Android?
Post by: cloud03 on January 13, 2014, 09:01:40 PM
Thanks for the replay jean..

That is actually what I do, I've sent an event after the climbing animation finished, but after initial test, before the climbing animation was fully finished, the translate action executed, so the character floats for a split second and then when back to the ground..

after that I tried to add a delay on the send event action, which is 0.02, and it works nicely on PC everytime, but on Android it glitches (not all the time, but often), I've tried increase the delay to 0.035, and it still glitches on android..

Do you have other solution?
Title: Re: Different Behaviour between PC and Android?
Post by: dasbin on January 13, 2014, 09:10:12 PM
It sounds like you are saying an event is being sent before it is actually called, which doesn't really make sense. Unless there is a bug in the event handler which isn't taking into account the actual rendering. It might be worth getting to the bottom of what is causing it, and filing a bug report if need be.
Are you using Unity's built in animation system here?
Title: Re: Different Behaviour between PC and Android?
Post by: cloud03 on January 14, 2014, 01:46:04 AM
Yep I'm using Unity builtin Animation (Legacy ones)...

Okay, I'll try to repro the case on a clean project...and I'll post the result.