Hello, I am a game designer who is trying to learn some scripting. However, I have no idea where to begin on this prototype of mine. You see, I have this rocket sitting in my scene which I want to control with a system similar to Asteriods. You know, rotate and thrust. But I just don't have any clue where to start. I understand the concepts behind programming languages, but I lack the experience to do this without some guidance.
Here is some information about the game, Liftoff:
The goal is to blast off from a planet's surface and escape its gravity well. It is played on vertical scrolling levels filled with obstacles. Think Asteroids with gravity on rails.
My main concern is getting the rocket manipulated by the keyboard the way I want. I'll worry about the rest of the game once I get the controls feeling right. Can anyone help me?
asked Jan 03, 2010 at 05:36 PM
Take a look at the rigidbody class
It is the component which controls all the physics stuff so you don't have to worry about it (very much).
And take a look at the Input Class which is the class from where you can get key presses and such stuff.
Now, an example:
If you want to move your rocket forward/backwards when you press the up/down (or w/s) keys you can do it like this:
Hope it helps.
answered Jan 03, 2010 at 06:06 PM