Making a working brake for vehicles

Ask questions, discuss ideas, get answers
Post Reply
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Making a working brake for vehicles

Post 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..
Poow
Posts: 271
Joined: Sun Nov 01, 2009 8:00 pm
Location: Germany
Contact:

Re: Making a working brake for vehicles

Post 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.
You’re entering a world of pain!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

put a stick in the wheel! :mrgreen:
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Making a working brake for vehicles

Post 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..
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Making a working brake for vehicles

Post 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. ;)
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Making a working brake for vehicles

Post by Swaffy »

What map is your ZPU on, and what team?
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Making a working brake for vehicles

Post by Apache Thunder »

El Alamein. Both teams, can be found in the hangers. :D
ImageImageImage
I have cameras in your head!
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: Making a working brake for vehicles

Post by Swaffy »

I see it now. The trailer hitch thing comes down and lowers the movent from the gun firing.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
Post Reply