Jump to content

Weird animation jump


Hersir
 Share

Recommended Posts

Hi,

Trying to debug weird animation issue, when during animation it jumps to first/last frame and than back and continue further normally. Happens for both camera/mesh animation, as it is very rare its not easy to get some data :)

Maybe someone have seen similar issues ? Happens ofter on safari especially on iPhone 10. 

Thank you

Link to comment
Share on other sites

Ok found something, when it happens `currentFrame` inside `animate` function of `RuntimeAnimation` is `0`, so if there are 25 frames it goes like 1,2,3,4,5 .... and than 0 and after that jumps back to 25.

Will dig more to understand what causes it to be 0.

Link to comment
Share on other sites

var currentFrame = returnValue ? from + ratio % range : to;

This causes it.

So example:

from: 0;

to: 25;

if ratio is 25 than this will cause current frame to be 0.

if (((to > from && ratio > range) || (from > to && ratio < range)) && !loop) { ...}

and ratio can be end value as in the if statement `ratio > range` is used, so in case ratio === range it still will do that calculation and will not set returnValue to false to jump to last frame

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...