How can I self create a stop and gas pedal prefab for the unity SkyCar?

Hi.

When you add the official Unity3d car prefab in the scene and start it on android you see a stop and a gas pedal texture.

I want to make a stop and gas pedal prefab self and then I want to connect it with the sky car.

How can I do that?

thx

The first step in learning anything is to break it down into chunks. Using the resources on this and other sites, load up the car scene you talk about and start breaking down the parts of it, learning how they all work. Find the graphics for the pedals. Find the game objects in the scene that display them. Find the scripts on those objects that handles touches and turns them into meaningful game information. And finally find how that information is presently handed off to the car in there right now.

Once you know those things, you will be in a good position to begin considering putting the gas/brake into your sky car, and it should be quite easy at that point because you’ve built up a complete foundation of knowledge. That’s what is so incredibly cool about all the Unity samples out there: they WORK, and as such they can be dissected and examined to figure out HOW they work, and to understand how people solved various problems so that you can solve your own problems.

And of course, as you are going through this, always feel free to post here on scripting ay questions you have, but only after making a legitimate effort to understand their function on your own, by using google, c# reference, etc.

1 Like