Itwen MoveTo - jump

Hello everyone. I’m using ITween, iTweenPath to make a car following a path. I want the car jump when you press the space button, but I can not. Can anyone help?

void Start () {
		iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("pathteste"), "time", 10,"easetype",iTween.EaseType.linear, "orienttopath", true));
	}

One solution is to make the visual car a child of an empty game object at the same position. You use the empty game object in the iTween call. You implement the jump in a separate script attached to the car that changes the car’s transform.localPosition. Something like:

#pragma strict

public var jumpHeight : float = 0.75;
public var jumpTime : float =	 0.8;
private var jumping = false;

function Update () {
	if (!jumping && Input.GetKeyDown(KeyCode.Space)) {
		Jump();
	}
}

function Jump() {

	jumping = true;
	var timer : float = 0.0;

	while (timer <= jumpTime) {
	    var height : float = Mathf.Sin(timer / jumpTime * Mathf.PI) * jumpHeight;
		transform.localPosition = Vector3(0, height, 0);
		timer += Time.deltaTime;
		yield;
	}

	transform.localPosition = Vector3.zero;
	jumping = false;
}