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

Speed boost ramp

$
0
0
Hi, I'm having a little problem with my boost ramp code.I'm trying to make a ramp like in Sonic, if the player steps in it get launched to the air. My code is VERY simple ('cause the logic is simple, I guess), but it does nothing at all. Thanks for your help :) public float impulse = 5.0f; Rigidbody rb; void OnTriggerEnter (Collider col){ if (col.tag == "Player") { rb.AddForce(transform.forward * impulse); } }

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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