Jump to content

Vehicle Brake


norbert
 Share

Recommended Posts

Hi at all,

 

I have write a new command in the driver.lua file.

 

if KeyDown(KEY_SPACE)==1 then

chassis:SetVelocity(Vec3(0,0,0),0)

end

 

Ok, but if the car is on a mountain, it still rolls very slowly ???

And the "GetBodyVelocity" command speak not zero.

 

 

Someone an idea ?

 

Norbert

Link to comment
Share on other sites

You need to make a handbrake system for the car, which is controlled by some flag like "handbrakeactive=true". Without that, cars will always roll around terrain slopes freely. It works like a real car.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...