Boost Power!
Boost Power!
By Pedro Colon
Boosting!
Boosting! An important aspect of Kart Racing! Whether in Mario Kart or Crash Racing, there is a boost pad somewhere around the level, waiting to be used! And since RAD Kart Racer is a kart racing game, should be easy yeah? Well, yes and no. Once figured it was actually pretty easy. But there was some complications, mainly to do with how unity handles stuff that made it a bit difficult. So lets go over it, shall we?
Unity Composition
Unity is a little funny sometimes. On the one hand, its a really good tool that can get the job done, with convent and "sensible" (for the most part) development tools. However, it is not a perfect tool. To be fair, nothing is and this is just working around the quirks or rather lack of knowledge of the engine. My problem was trying to figure out how to use the composition system to have a boost power working for the kart. So I tried different ways of what I knew to solve the issue, such as GetComponent. However, these ways didn't work. Why didn't it work? Simple.
I tried to implement the collision within the overall prefab instead of the one part where it truly mattered. The sphere. You see the sphere is what we are using to control the karts, what we are using to move forward and turn. And said sphere had a sphere collider that was connecting with the box collider. And with this, it became clear. I should be using the script in the sphere rather than on the top of the prefab to get the powerup working.
Comments
Post a Comment