07-19-2018 12:16 AM
public class Football : MonoBehaviour {
private Rigidbody rb;
public float Force = 1600;
void Start () {
rb = GetComponent<Rigidbody>();
}
void FixedUpdate () {
OVRInput.FixedUpdate();
if (OVRInput.Get(OVRInput.Button.One))
{
rb.AddForce(Force * Time.deltaTime, 0, 0);
}
if (Input.GetKey(KeyCode.Keypad8)) {
rb.AddForce (Force*Time.deltaTime,0,0);
}
}
}
07-20-2018 06:38 AM