hand break skid
by Ryan Ackley · in Torque Game Engine · 03/22/2003 (8:04 pm) · 12 replies
Anyone have any ideas on how to do this? Basically I'm looking to have the rear wheels "slide" when the brake is applied during a turn. Currently, all wheels have the same forces applied to them, so the car slows down uniformly, and doesnt slide in the way I'm looking for. Any thoughts on this one? Thanks
Ryan
*edit, the title of the post should be spelled brake*
Ryan
*edit, the title of the post should be spelled brake*
About the author
#2
09/09/2006 (4:36 am)
I would also like to know this so I can get to this to eventually. As far as I could see in the code it looked like ti was only applying the handbrake to the powered wheels but obviously this is not so.
#3
Anthony: the rear wheels are typically wheels 2 amd 3, while the front ones are wheels 0 and 1.
09/09/2006 (5:58 am)
What I would do is treat the rear wheels as if they have greatly reduced (or zero) friction values, while the car is brakingAnthony: the rear wheels are typically wheels 2 amd 3, while the front ones are wheels 0 and 1.
#4
This effectively only applies braking forces on the rear wheels. This does stop the rear wheels and the car while allowing thefront wheels to continue rotating, the only downside to this approach is that the engine braking is also not applied to the front wheels so if the car is flipped adn the player dismounts you will see the rear wheels slow and stop but the front wheels continue rotating.
This soultion is just a quick hack, i will look into adjusting hte rear wheel friction dynamically. would you recommend i do this in the source or in a scripted function? what is the best way to dynamically change a value in the wheeled vehicle datablock, is this possible dyanmicallY?
Finally would anyone be interested in a resource if i can get this working?
09/09/2006 (7:07 am)
Right so far i have isolated the braking code in the wheeledvehicle.cc source, its the section where the brakeVel is applied to the wheels, i have added a simple counter to the main loop and only apply these braking forces on the rear wheels (2 and 3). This effectively only applies braking forces on the rear wheels. This does stop the rear wheels and the car while allowing thefront wheels to continue rotating, the only downside to this approach is that the engine braking is also not applied to the front wheels so if the car is flipped adn the player dismounts you will see the rear wheels slow and stop but the front wheels continue rotating.
This soultion is just a quick hack, i will look into adjusting hte rear wheel friction dynamically. would you recommend i do this in the source or in a scripted function? what is the best way to dynamically change a value in the wheeled vehicle datablock, is this possible dyanmicallY?
Finally would anyone be interested in a resource if i can get this working?
#5
The game I'm working on overrides a lot of the physics values of wheeledVehicle like this, for example as tyres get damaged their friction values and spring values reduce. As engines get damaged, the engineTorque of the vehicle reduces. One of the ways tyres get damaged is when a very high amount of friction is observed - you can also do cool things like drop skidmark decals at that point.
09/09/2006 (11:37 am)
Datablocks aren't designed for dynamic value changing: it might work if you add an extra field to the wheeledVehicle class itself, and override the datablock value with this new value within the engine code. I'd do it in the engine source, you will after all have to make source changes to get this happening at all.The game I'm working on overrides a lot of the physics values of wheeledVehicle like this, for example as tyres get damaged their friction values and spring values reduce. As engines get damaged, the engineTorque of the vehicle reduces. One of the ways tyres get damaged is when a very high amount of friction is observed - you can also do cool things like drop skidmark decals at that point.
#6
09/10/2006 (7:18 am)
Very intersting sam, any plans on releasing some resources for this? applying decals to the landscape especially.
#7
09/13/2006 (3:03 am)
Got the handbrake sliding working now to a degree, just needs some tweaking to adjust the friction based on the vehicle mass opposed to a hardcoded friction reduction and it will be done. If anyone is interested in this i will release a resource of it.
#8
11/22/2006 (10:35 am)
@ Anthony: I'm interested...
#9
11/22/2006 (1:01 pm)
Definitely interested!! I was going to have to do this myself soon and this would be a nice time saver and its a necessary addition to my game.
#10
11/23/2006 (2:20 pm)
Ok will do , sorry hav been rater inactive lately , starrting a new job and all that. absolutely coded out in the evenings! will try to get something togehter ove r the next few weeks.
#11
I was just checking to see if you are still planning to release a resource on this?
01/10/2007 (2:51 pm)
Hey Anthony, I was just checking to see if you are still planning to release a resource on this?
#12
i have written decal for tires pls check this resources
http://www.garagegames.com/mg/forums/result.thread.php?qt=56390
01/10/2007 (9:29 pm)
Hi anthony i have written decal for tires pls check this resources
http://www.garagegames.com/mg/forums/result.thread.php?qt=56390
Torque Owner Anthony Potamitis
thanks