When grounded my vehicle moves rather slow
When slightly off of the ground I get the same results as if grounded
Lifted off the ground slightly more the vehicle accelerates like 10 time more the normal rate.
[Heres a video][1]
if(rocketBoo)
{
if (timerReset)
{
TimerReset ();
timerReset = false;
}
Invoke ("Timer", 0.001f * Time.deltaTime);
ground = false;
Debug.Log ("go!");
Camera.main.transform.eulerAngles = new Vector3 (0,0,Random.Range(0,shake));
if(timer >= chargeTime)
{
Vector3 rocketDirection = Vector3.Lerp (minY.transform.position,maxY.transform.position,0.1f);
this.GetComponent ().AddForce ((rocketDirection - this.transform.position) * rocketBoost, ForceMode2D.Impulse);
}
if(timer >= accTime)
{
Vector3 rocketDirection = Vector3.Lerp (minY.transform.position,maxY.transform.position,0.1f);
this.GetComponent ().AddForce ((rocketDirection - this.transform.position) * acceleration, ForceMode2D.Impulse);
}
if(timer >= stopTime)
{
Camera.main.transform.eulerAngles = new Vector3 (0,0,0);
TimerReset ();
rocketBoo = false;
}
}
[1]: https://www.youtube.com/watch?v=oSzS419Jz6s&edit=vd
↧