Question by
AdmiralLuke · Aug 23, 2017 at 08:01 PM ·
physicsontriggerentertriggersfixedupdatespeed up
How Do I increase speed based off of a trigger collider?
I am expanding on the RollaBall tutorial for a practice project. I am attempting to make a larger area with ramps and other obstacles. I want to make speed boost pad. I tried using the OnTriggerEnter and put in the if (other.GameObject.compareTag ("Speed Boost") after that I tried rb.AddForce (Movement x 50); I was wanting it to increase the speed from the starting 10 to 50, and then after it hit a wall reset it back to 10. I am not sure if I should instead put it in the void fixedupdate or somewhere else. Did I have the right idea or is it some other code I should be using?
Comment