Can a looping interpolation stop maintaining a constant speed?
Hello everyone. I've run into an odd issue and didn't know if someone out there may know why its happening and/or how to fix it.
I have a large stationary character that I have made "walk" (scrolling world but it's stationary.) It's legs consist of two parts: thigh to knee and knee to foot. I am using looping interpolation commands in both segments to create my walk cycle.
Ex. For the knee, it rotates form 0-20 degrees in one second, and then 20-0 in one second. At a same time it moves forward in X for 1 sec. and back to the start X in 1sec. Together, this creates a 2 second loop.
The knee to foot region moves from starting X to new X in one second, then new X to start X in one second. The foot also interpolates from its starting Y position to a higher Y position in 1/2 a second and back again in another 1/2 second. This makes the whole foot lift as it moves forward, then slides along the ground back to its starting X position.
When I view this in the GS preview, everything is fine. When I preview it with the GS Viewer on my iPad, after awhile the two actors seems to go out of sync. Does anyone know why this could happen? Is it something with the GS Viewer? I can't imagine how two interpolate commands that run from one to the other at a constant rate could get out of sync as they can't be affected by outside variables.
Any help or ideas are greatly appreciated. (Maybe there is someway to constrain the movement and rotation of the thigh to the forward and backward motion of the foot?)
I have a large stationary character that I have made "walk" (scrolling world but it's stationary.) It's legs consist of two parts: thigh to knee and knee to foot. I am using looping interpolation commands in both segments to create my walk cycle.
Ex. For the knee, it rotates form 0-20 degrees in one second, and then 20-0 in one second. At a same time it moves forward in X for 1 sec. and back to the start X in 1sec. Together, this creates a 2 second loop.
The knee to foot region moves from starting X to new X in one second, then new X to start X in one second. The foot also interpolates from its starting Y position to a higher Y position in 1/2 a second and back again in another 1/2 second. This makes the whole foot lift as it moves forward, then slides along the ground back to its starting X position.
When I view this in the GS preview, everything is fine. When I preview it with the GS Viewer on my iPad, after awhile the two actors seems to go out of sync. Does anyone know why this could happen? Is it something with the GS Viewer? I can't imagine how two interpolate commands that run from one to the other at a constant rate could get out of sync as they can't be affected by outside variables.
Any help or ideas are greatly appreciated. (Maybe there is someway to constrain the movement and rotation of the thigh to the forward and backward motion of the foot?)
Comments
----------------------------------------------
http://davidgriffinapps.co.uk/
iPad: End of the Earth game coming soon to the iTunes App Store....
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
8-X
Interpolate has no values between 9.0 and 1, you can have 6.786 and 4.356 and (a personal favourite) 8.673 . . . . . But go above 9.0 and interpolate jumps straight to 1 !
After that it's fine.
@Tynan - Wow, never knew that. Seems like quite a problem wouldn't you think?
"Wow, never knew that. Seems like quite a problem wouldn't you think?"
Yep, see this thread: http://forums.gamesalad.com/discussion/39504/how-do-i-make-fade-out#Item_25
Not sure if it's the root of your problem, might be involved ?
"Don't think this would have helped me""
Rather than helping you with your animation it was posted as a possible cause for the loss of sync over time.
Oh, no, I understand that, I was only referring that, in this particular case, I'm not sure if it was having an affect on things as my values were always above 1. It is an interesting phenomena though as far as how interpolate works.
Ah! Understood.
"It is an interesting phenomena though as far as how interpolate works."
Yep, it explains a few little glitches in Gamesalad (fades / volume changes / moves etc) - being aware of it also means you can solve these annoying issues fairly easily.