Car.cs
by Mark Junior · in Technical Issues · 10/06/2006 (1:16 am) · 20 replies
Hi i own tge and i am editing the car.cs file in the starter.racing folder i am trying to make the car faster. i tried this first:
maxspeed = 60 //default is 30
and then that helped but the car kept loosing control doing certain powerslides ( takes a while for the car to turn ) so then i did this:
antiSwayForce = 6 //default is 3
but it kept on power sliding what do you guys sugest? ive got the speed to work but the cars control is poor.
maxspeed = 60 //default is 30
and then that helped but the car kept loosing control doing certain powerslides ( takes a while for the car to turn ) so then i did this:
antiSwayForce = 6 //default is 3
but it kept on power sliding what do you guys sugest? ive got the speed to work but the cars control is poor.
About the author
#2
10/06/2006 (5:26 pm)
Sorry WheeledVehicle.cc
#3
10/07/2006 (12:38 am)
Hey, its you again. Ill try that
#4
10/07/2006 (12:39 am)
Yes i have saved the file after editing as in compiling it
#5
10/07/2006 (12:43 am)
Hmm still doesnt work ill try compiling the project again
#6
open car.cs try change z value,negative something
10/08/2006 (10:59 pm)
MassCenter = "0 -0.5 -1.2"; open car.cs try change z value,negative something
#7
10/09/2006 (7:39 am)
I tried that but now when i changed masscenter to that value, when i "DARE" to turn, it turns WAAAY to much like if i turn 1cm the car does a powerslide and turns all way round. are you actually trying the code yourself?
#8
10/09/2006 (7:40 am)
I changed it to this: masscenter = "0 -0.5 -1.2";
#9
10/09/2006 (9:00 am)
Do a search for a downforce mod, it plugs right in and will give you what you are looking for.
#10
10/09/2006 (3:08 pm)
Yes i did. it work for me though. Maybe u should listen to David Tiernan since i'm also very new to this engine
#11
10/10/2006 (4:43 am)
Well i looked at downforce mod David, but it looks like it just shows how to mount unmount vehicles in fps.starter im looking for something to make my car fast and controlableive got the fast done tho
#12
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5840
it adds a varaible downforce to the car as the speed increases, this allows you more control and less slip at higher speeds as it makes the car essentially weigh more which is what actual physics do.
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=8786
that's sticky wheels, basically it keeps your center of gravity benieth your tires no matter the orientation of the car. You can literally park your car upside down with that mod.
Really though search through the resources one by one, I know there are a ton but I have literally like 12 good vehicle based links from there which all work out great, you just need to take the time to sort through them all.
10/10/2006 (1:48 pm)
Well to be more specific,http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=5840
it adds a varaible downforce to the car as the speed increases, this allows you more control and less slip at higher speeds as it makes the car essentially weigh more which is what actual physics do.
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=8786
that's sticky wheels, basically it keeps your center of gravity benieth your tires no matter the orientation of the car. You can literally park your car upside down with that mod.
Really though search through the resources one by one, I know there are a ton but I have literally like 12 good vehicle based links from there which all work out great, you just need to take the time to sort through them all.
#13
10/11/2006 (12:37 am)
It helps me to.Thanx man
#14
10/11/2006 (5:25 am)
Thanx havent tried the second link but i think the first one worked. (couldnt tell the difference if it worked or not :P)
#15
I once tried to create a function to activate the sticky wheels code by speed but that went less than well hehe. Now that I have a bit more programming under my belt I will give it another go down the road.
The first link though gives you the downforce you need to keep your tires glued to the ground which was the traction at high speed you were looking for.
10/11/2006 (4:46 pm)
Note that the 2nd link is sticky wheels, this will make jumps harder however if you are doing a loop it keeps your tires glued to the road upside down even.I once tried to create a function to activate the sticky wheels code by speed but that went less than well hehe. Now that I have a bit more programming under my belt I will give it another go down the road.
The first link though gives you the downforce you need to keep your tires glued to the ground which was the traction at high speed you were looking for.
#16
10/12/2006 (6:28 am)
Cant i just increase mass or friction? i dont see the difference with sticky wheels and increasing mass and friction?
#17
This will increase how fast your tires are spinning.
However Mine likes to spin drift when I increase my wheel speed!
10/21/2006 (1:26 pm)
You are going to want to change the the maxWheelSpeed!This will increase how fast your tires are spinning.
However Mine likes to spin drift when I increase my wheel speed!
#18
10/21/2006 (1:27 pm)
Spin drift meaning drift because of the tire speed not braking
#19
10/24/2006 (2:15 am)
Big blue you didnt seem to see my first post on this thread...
#20
I edited the "car.cs" file in this way:
as you can see I changed the values of staticFriction to 2000 and kineticFriction to 2000..
and lateralDamping to 1, longitudinalDamping to 1;
this seems to have a more stable car at high speed...
to increase the speed look down where it says:
here you can increase the engine power and the maxWheelSpeed... and your car will go faster...
I'm a beginner here, so if someone has a better solution.. welcome...
;)
11/15/2006 (4:12 pm)
Saska I had your same problem... car loosing control when running fast on a plain terrain without bumps...I edited the "car.cs" file in this way:
datablock WheeledVehicleTire(DefaultCarTire)
{
// Tires act as springs and generate lateral and longitudinal
// forces to move the vehicle. These distortion/spring forces
// are what convert wheel angular velocity into forces that
// act on the rigid body.
shapeFile = "~/data/shapes/buggy/wheel.dts";
staticFriction = 2000;
kineticFriction =2000;
// Spring that generates lateral tire forces
lateralForce = 18000;
lateralDamping = 1;
lateralRelaxation = 1;
// Spring that generates longitudinal tire forces
longitudinalForce = 18000;
longitudinalDamping = 1;
longitudinalRelaxation = 1;
};as you can see I changed the values of staticFriction to 2000 and kineticFriction to 2000..
and lateralDamping to 1, longitudinalDamping to 1;
this seems to have a more stable car at high speed...
to increase the speed look down where it says:
// Engine engineTorque = 10000; // Engine power engineBrake = 700; // Braking when throttle is 0 brakeTorque = 18000; // When brakes are applied maxWheelSpeed = 60;
here you can increase the engine power and the maxWheelSpeed... and your car will go faster...
I'm a beginner here, so if someone has a better solution.. welcome...
;)
Torque Owner Abdullah Bade
// Gravity constant
static F32 sWheeledVehicleGravity = -30;
I changed it to -30, but some other guy change it to -45. Jus change it around that that suit ur car