Game Development Community

Change speed of wheeledvehicle

by Yong-rui Wang · in Technical Issues · 09/20/2006 (9:39 am) · 2 replies

I want my wheeledvehicle go faster, but there are so many params to confuse me, does anybody know which params I should change? Thanks a lot!

#1
09/23/2006 (2:51 pm)
You can increase your car speed by typing somthing like this:

YourCarDataBlock.maxWheelSpeed = 60; //default 30

High speeds can cause great control lose, I'll look at the other settings to try and fix that.

EDIT-
I got it mostly, use:

YourCarDataBlock.antiSwayForce = 6; //default 3
//and
YourCarDataBlock.maxWheelSpeed = 60; //default 30

You can find these things in your car.cs file under the "WheeledVehicleSpring" and "WheeledVehicleData" part of the .cs file.

NOTE-
Whatever you do to the "maxWheelSpeed" do the same to "antiSwayForce".
To make this easy, you could do this instead:

YourCarDataBlock.antiSwayForce = 3 * 2;
YourCarDataBlock.maxWheelSpeed = 30 * 2;
#2
09/23/2006 (7:13 pm)
Thanks Caleb, I will try it, yes, it seems whatever I change, the car lost control.

wish you a good day!