- Home /
iTween MoveTo Function is Jumpy
I am using the "MoveTo" command for iTween on my main camera to do a smooth panning up to the main menu for my game. The issue is, is that when we approach the last parts of the animation it slows down a ton and then jumps to the final position I wanted it at. Is this just an issue with my frame rate or is there a setting I don't have set up? Kinda lost at this point. Thanks in advance for the help!
Here's my iTween script I'm using for the camera pan.
public void Start()
{
iTween.MoveTo(gameObject,iTween.Hash("y",6.720898,"z",-4.269152,"time",15.0));
}
I found that some easetypes jump and others don't.
For instance, Expo jumps, but Quart does not.
Answer by RCraig · Jul 10, 2012 at 03:52 PM
Did you get this figured out? If not, I believe your issue is the default easetype. I had the same issue until I changed my easetype to linear or EaseInOutSine. Once I changed it, the movement was perfectly smooth. Not sure what the default easetype is, but it definitely doesn't seem to be linear.
Add something like this to your Hash: "easetype",iTween.EaseType.linear
*NOTE: Not tested as I'm at work.
Perfect! The EaseInOutSine gave it the smooth transition I was looking for. I ended up shelving the project for a little but I plugged it in and it worked smoothly. Thanks!
Answer by bojangles · Dec 14, 2013 at 04:37 PM
Also:
If the gameObject you're tweening has a rigidbodgy attached, the iTween 'physics' flag is set. This can cause jittering in movements...
Is there any way to solve this without removing the rigidbody? I need the rigidbody for other things but I want the linear Easetype, which is causing jittering.