Hi,how can you make a jump with iOS. Im just testing it and the unity remote 4 app is good… but I’m having a problem,I’m creating a very simple jump. For some reason this script doesn’t work. Please tell me what is wrong or what i forgot.
using UnityEngine;
using System.Collections;
public class taptojump : MonoBehaviour {
public GameObject cube;
private float jumped;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
#if UNITY_EDITOR
if (Input.GetMouseButtonDown(0)) {
gameObject.transform.position = new Vector3(209,5,43);
jumped = Time.realtimeSinceStartup;
}
if (Time.realtimeSinceStartup - jumped == 1) {
gameObject.transform.position = new Vector3(209,1,43);
}
#endif
}
}
thanks for your help