Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Newton vehicle help.

Author
Message
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 18th May 2008 02:58
Hey guys, need a bit of help with vehicles in newton.

I'm using some source I got from somewhere! It's entitled 'drive' but I don't know who wrote it originally. I'm trying to code a handbrake like effect and need to stop a tires rotation. NDB_VehicleTireSetTorque doesn't work, and neither does NDB_NewtonVehicleReset. (It's funny, but useless for this!)

Anyone got any ideas please?

3700+ Athlon 64 - Geforce 7600 GS - 2GbDDR2 RAM - 40Gb Hdd (In this pc) - Windows Vista Ultimate (x86)
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 19th May 2008 12:56
These 2 commands are what you need:

Quote: "NDB_VehicleTireSetMaxBrake
syntax: NDB_VehicleTireSetMaxBrake vehicle, tire, maxbrake

vehicle ID of the vehicle joint (integer)
tire_id ID of the tire (integer)
maxbrake maximum braking force the tire can handle (float)

returns: nothing.

Comments: set this value to the absolute max braking force the tire can handle. then when you turn on the brakes for the tire, Newton sill calculate the necessary force to stop the tire. if it's less than this maximum, it'll lock the tire. if it's more, it'll apply this amount."



Quote: "NDB_VehicleTireBrakesOn
syntax: NDB_VehicleTireBrakesOn vehicle, tire, flag

vehicle ID of the vehicle joint (integer)
tire_id ID of the tire (integer)
flag 1 = brakes on, 0 = brakes off (integer)

returns: nothing.

Comments: use this function to turn the brakes on/off for a tire."



Now first of all you check out the overall omega of a tire with this command:


And then after some trial and errors you find the maximum force to be applied to the tire(this varies and depends on many different factors)

so you set this amount with the related command and when you set vehicle brakes on, then it locks the tires.
But if you need a normal brake, you keep this maximum force alittle higher so it slows the omega of tires like ASR.

hope it helps.

There is always one more imbecile than you counted on.
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 19th May 2008 12:59
Quote: "NDB_NewtonVehicleReset. (It's funny, but useless for this!)"


that command resets the tires for once in the entire loop. Surely it works however as your vehicle is on the move, resetting the tires wont do any good because the movement of the vehicle will force it keep moving.

There is always one more imbecile than you counted on.

Login to post a reply

Server time is: 2024-11-23 02:41:47
Your offset time is: 2024-11-23 02:41:47