Making Cars Slide
Author: | yuyu
|
Submitted: | 13th June, 2003
|
Views: | 5457
| Rated: |
|
|
Sliding cars are always good fun.
Especially when you can do doughies and tear around corners while tearing up the bitumen. This is the easiest way I know to make slides work so I decided I'd tell you this in my first article.
The first thing is a base object. This is gonna be invisible so it doesnt need to look like anything just be the same shape as your main object (Or its base if your doing an Isometric game).
This base object can simply have a race car movement because thats not normally too buggy.
You then need your main object which is what the player will see. This doesnt need any movement just static will do.
Now make the position of the top object always equal that of the base. Then make its direction always equal that of the base plus its value A.
Now when you play you should simply see you main object over the top of your base.
Make the base invisible coz we dont need to see it.
Now set the turning of the bases movement to 0 and set up your own steering controls in the Event editor.
(Repeat while right is pressed,Every 00:0
Set obect 1 direction to object 1 direction -1
(Repeat while left is pressed,Every 00:0
Set obect 1 direction to object 1 direction +1
You can make the timing change for different speeds so the car doesnt turn when it stops and stuff.
Now make it when you turn left it adds to the value A and when you turn right it subtracts. The timing will have to be different because the car will spin too much if you leave it like that.
The next thing is to make the car turn back into the normal driving line when it isnt turning. You can find your own means of doing that.
And youve got to make a stop point on the slides meaning it doesnt add to value A when value A is greater than 5 and it doesnt subtract when it's under -5.
I've used this in Bens Enginebike game which will be finished soon and then you can see this in action.
|
|
yuyu
Registered 13/05/2003
Points 202
|