- Home /
fixing choppy animation when using itween
Summery: I have a character with the character controller component and a custom 3rd person movement script and camera. The pirate ship that the character is on uses the itween MoveTo function to move the pirate ship on a set of waypoints from the Itween Path scripts.
Desired Functionality: To re-create the World of Warcraft flight path feature where the character can travel across the terrain using a ship.
The Architecture of the Game Object is as follows.
Pirate Ship - Empty Game Object - Contains Shipfly.cs |-Pirate Shop - Pirate Ship.fbx - Itween Path.cs (This handles the itween pathing and waypoints. This can be attached to any object in the game) |- Player Character -Prefab of with all necessary scripts for the character
Scripts:
Shipfly.cs
using UnityEngine;
using System.Collections;
public class Shipfly : MonoBehaviour {
// Use this for initialization
void Start () {
iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("Ship Fly 1"), "time", 30, "orienttopath", true));
}
}
I parented the character to help make sure collisions work. The pirate ship has a mesh collider. The problem is it the ship is lagging on the path or chops. I tried unparenting the character but then he just falls right through the ship. Move To disregards the Mesh Collider.
I appreciate any help, thanks!
Your answer
Follow this Question
Related Questions
iTween Char Animation 1 Answer
Can I make animations snap to a frame? 1 Answer
Using iTween for custom variables 3 Answers
Update iTween Path at Runtime 1 Answer