Question by
Erick-Braian · Jun 11, 2016 at 08:41 PM ·
addforcespeedramp
Speed boost ramp
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);
}
}
Comment