My Car simulation does not behave right...

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

My Car simulation does not behave right...

Postby smr597 » Sat Feb 26, 2011 6:50 pm

Hello there, im new here but i think im not new to newton & physics...
So i use a newton wrapper & basically im not up to date, but i hope this is not the case, why my car acts wrong.
Because in some cases it acts really good...

Anyway this is my problem:
I can't do burnouts and cant loose traction at anypoint, cant do donuts, cant do burnouts cant do drifts UNLESS, i add enoromus ammount of torque to the rear wheels, witch is not that much of a sim but more like a hack or so...
Yes i do use a fully working pacejka model that i have taken from VDrifts source code,
and i also do have a pacejka optimization and traction circle code working.
So if i add alot of torque to the wheels i can control my cars drifts etc.
But the problem is that how should i do this in a correct way for newton? I do have a working driveline code, and it does work good when it comes to top speeds and rpm. BUT it's never loosing traction, like im always drivin with a torque control system and that is not the way i want to drive in my sim sort of a game.

I am using wheels omega to receive the wheels angular velocity and to get the torque like this:
Code: Select all
   Left_speed = RLome * RL_Radius
   Right_speed = RRome * RL_Radius   
   Driveshaft_Speed = final_drive * (Left_speed + Right_speed) / 2      
   Cranckshaft_Speed =  Driveshaft_speed * Gear_Ratio
   Cranckshaft_RPM = Cranckshaft_speed  * 30.0 / Pi
   engineTorque = EngineGetTorque(Cranckshaft_RPM) * throttle
   Wheel_Torque =  EngineTorque * Gear_Ratio * Final_Drive * Transmission_Efficiency
   Rear_wheel_torque = wheel_torque/2 * 1000


The car parameters are from real life (mass, gear ratios, suspension, tires etc)
For surface friction I have 0.50 static and 0.90 dynamic
For tire friction i only use the coefficients in the raycast tire sliding function.
When i hack the gear ratios and output torque, i can loose traction but that is a very bad way to do that, because in this way i can reach to 300km/h with first gear and i am not sure if a stock Nissan 350z can reach such a speed in it's first gear lol

I hope someone can explain me what i am missing or is this some sort of a simulatin limit?
Oh yeah and sorry for my bad english =)
smr597
 

Re: My Car simulation does not behave right...

Postby JoeJ » Mon Feb 28, 2011 2:27 pm

I don't now anything about driving physics and haven't used raycast car, but i'm bored while setting up system, so i'll reply...

You could decrease friction for back wheels instead of increasing torque.
In relation to factors like: Handbrake / high motor acceleration on low gear / big car angular velocity at high speed.
User avatar
JoeJ
 
Posts: 1494
Joined: Tue Dec 21, 2010 6:18 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 385 guests