Here’s my script :
#pragma strict
var forwardSpeed : float = 20;
var leftRotate : float = 5;
var rightRotate : float = 5;
var upLift : Vector3;
var number : float = 0;
function Update () {
upLift = transform.InverseTransformDirection(rigidbody.velocity);
if (Input.GetKey(KeyCode.Space)) {
rigidbody.AddForce (transform.forward * forwardSpeed);
}
}
So I want the y axis of upLift to be turned into a float and used in the variable “number”