- Home /
iTween makes a weird start on the path
I've been working with iTween and got the basics down, so maybe I'm overlooking something.
My code is pretty simple, I'm using the Itween graphic interface.
using UnityEngine;
using System.Collections;
public class Trayectoria_Leo : MonoBehaviour {
// Use this for initialization
void Start () {
iTween.Init(gameObject);
}
// Update is called once per frame
void Update () {
if (Input.GetKey(KeyCode.Space))
{
iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("Trayectoria"), "time", 10, "easetype", iTween.EaseType.linear, "delay", 1.5));
}
}
}
This works perfectly and it's a simple three nodes path, but then at the start the object instead of instantly following the path like it's supposed to, crawls back a lot and then starts moving along the path. I don't know if it's a kind of ease in or something. It strikes me as odd since the starting node is at the origin of the object.
Thanks in advance for your help. Dragonliger PS. if you need I can get a screenshot of the problem.
Answer by Dragonliger · Jun 20, 2013 at 11:50 PM
Found an answer upon further reading of the documentation, setting the property "movetopath" as false solves this problem.
Your answer
Follow this Question
Related Questions
itween MoveTo IndexOutOfRangeException 0 Answers
[SCREENSHOTS] itween Path, orientToPath and gameObject rotation, 2D game 3 Answers
How to move an object on a random path with iTween 1 Answer
How to create homing missile that follows path using Unity and iTween 1 Answer
How do Move a gameobject along a path WITHOUT A SPLINE 1 Answer