Page 1 of 1

Making a working brake for vehicles

Posted: Thu Jan 13, 2011 2:54 am
by fo0k
Any idea how to make a proper brake.. so you just stop.. (could be assigned to another key if needs be)

something to actually lock the wheels for instance..

Re: Making a working brake for vehicles

Posted: Thu Jan 13, 2011 12:50 pm
by Poow

Code: Select all

ObjectTemplate.Active Carhorn
ObjectTemplate.projectileTemplate SCUD-BRocket
ObjectTemplate.projectilePosition 0/0/0 
:lol:

But no... I haven't got a clue.

Posted: Thu Jan 13, 2011 2:00 pm
by freddy
put a stick in the wheel! :mrgreen:

Re: Making a working brake for vehicles

Posted: Sat Jan 15, 2011 2:26 am
by fo0k
-swaffy.. not sure what I did there but deleted your post in error. sry


but you are right about swapping seats... hmm.. maybe there is an answer there somewhere..... :ugeek:

kinda 'w' is also seat position 1.. and 's' is seat position 2.. but they are in the same position.. heheheh..

Re: Making a working brake for vehicles

Posted: Sat Jan 15, 2011 2:29 am
by Apache Thunder
Take a look at my mobile ZPU from my DCU mod. I had an issue with it moving backwards due to it's recoil. Sure I could increase it's mass, but I decided to make it more balanced by requiring the user to lower the back ramp thing to anchor it. The rotational bundle is controlled with the right mouse bundle and it has a few springs on it with DummyGrip (so the springs will not move and will act as a brake).

It works quite well and when the ramp was lowered, driving full power was drastically slower in speed. I'm sure with this combined with a custom material for the spring for extra friction could do what you want. ;)

Here's how my spring was coded:

Code: Select all

ObjectTemplate.create Spring ZPU_RampSpring
ObjectTemplate.geometry ZPU4_Wheel_M1
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.Grip c_PGFDummyGrip
ObjectTemplate.createInvisible 1
ObjectTemplate.setStrength 10
ObjectTemplate.setDamping 6
Place them near your visible wheels on a rotational bundle and with the right set up it could act in a manner similar to a handbrake.

You can set it up in way so that when the rotational bundle is not activated it will retract the wheels into the hull and will avoid unnecessary collision with things. Then pressing a key like the space bar would quickly make the rotational bundles extend out lowering the springs and would act as a brake.

I used this to make it retract on it's own when the key was not pressed:

Code: Select all

ObjectTemplate.setContinousRotationSpeed 0/40/0
Be sure you set the rotational speed faster then the reverse continous speed or else it won't move. ;)

Re: Making a working brake for vehicles

Posted: Sat Jan 15, 2011 3:08 am
by Swaffy
What map is your ZPU on, and what team?

Re: Making a working brake for vehicles

Posted: Sat Jan 15, 2011 7:38 pm
by Apache Thunder
El Alamein. Both teams, can be found in the hangers. :D

Re: Making a working brake for vehicles

Posted: Sun Jan 16, 2011 3:24 pm
by Swaffy
I see it now. The trailer hitch thing comes down and lowers the movent from the gun firing.