Hi, today I wanted make simple helicopter simulation. I started from helicopter controlling, vertical flight. My concept was: add vertical force to game object. Here’s m code:
var rb : Rigidbody2D;
public var thrust : float = 12f;
private var grounded : boolean = true;
function Start () {
rb = GetComponent.<Rigidbody2D>();
}
function Update () {
if(Input.GetKey(KeyCode.Space)) {
Debug.Log("up");
rb.AddForce(Vector2.up * thrust * Time.deltaTime, ForceMode2D.Force);
}
}
While “Up” is debugged, force wasn’t added, helicopter stayed in same place. Any idea what can be wrong ?
PS, sorry for my english ![]()