I attached the following script to a ball. When I run the script, it always launches towards the camera. Why is that?
and how often does function update() cycle? Once a second?
var time = 0;
var x =0;
var y =0;
var velx = 4;
var vely = 300;
function Update ()
{
time++;
x = velx * time;
y = vely * time - 0.5*9.8*time*time;
transform.position = Vector3(0,y,x);
}