Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Rigidbody Addforce not working as expected ( video included)

$
0
0
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

Viewing all articles
Browse latest Browse all 1264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>