Tokamak help please...

Blitz3D Forums/Blitz3D Programming/Tokamak help please...

IPete2(Posted 2004) [#1]
Hi all,

I am using a steering wheel and pedals with the original car demo Sweenie posted a few weeks ago.

I have sorted out acceleration and steering, but I can't figure out how to make the car brake realistically.

Can anyone point me in the right direction please?

Many thanks

IPete2.


Rob(Posted 2004) [#2]
the tokamak forum is where to go, find it on the forum @ www.playerfactory.co.uk


Danny(Posted 2004) [#3]
Increase friction on the front wheels?
Or perhaps create a simmilar response by making the front wheels massively heavy forcing the car to dip and come to a halt???

Sorry - just guessing here, no actual experience with this in Tokamak...

0.2
Danny.


Gabriel(Posted 2004) [#4]
I'm not familiar with the demo in question, but it seems to me that increasing friction would be more like slowing down than braking ( a fine distinction, but i hope you see what I mean. )

Presumably acceleration is achieved by applying a positive force, so could braking not be as simple as applying a force in the opposite direction?


Rob Farley(Posted 2004) [#5]
That would be my assumption too sybixsus.


Danny(Posted 2004) [#6]
Sure. "Braking" means as much as slowing down very very fast right? Else you'd call it 'stopping' :/
You hit the brakes, your wheels stop turning, and nothing else but the friction between the rubber of your tires and the ground will bring it to a halt after a few meters. Right? More (extreme) friction means quicker stop (more 'abrupt braking').

If I understand Tokamakokikak enough (=little) and you parent the body of your car to the wheels. Then a change in dynamics in the wheels (speed /direction) should be reflected in the dynamics of the car-body (given enough spring, etc.)?!

?!


IPete2(Posted 2004) [#7]
Hi guys,

Thanks for the suggestions...

I have now come up with a way to make it brake, as follows for those who also need to know:

I check the brake pedal whose setting ranges from 100 - 0.

I take the figure given away from 100 to reverse the range 0-100.

I use this calculation to add linear and angular 'damping' (er I think - it's on a different Hard drive so I can't exactly remember or view it now).

So the harder you brake the more the braing occurs.

I reset the effected damping variables on acceleration.

I'll find time this evening to post a code example for you to slot into your car demos.

Ipete2.