0 votes
by
Hello I want to know how let EVP make vehicle to do the burn out like GTA4 and GTA5?

In GTA, player can press "throttle" and "break" key same time to do the burn out, can I add this function on my vehicle?

1 Answer

0 votes
by
 
Best answer

This can be done by configuring a specific setup with a custom script. You need to discard the VehicleStandardInput script and write your own input script that configures the car properly when some input combination is detected. I'm pretty sure GTA vehicles do the same.

So when you detect the expected input input and conditions (throttle + brake + very low speed) your script should:

  • Configure handbrake in the front wheels only in the vehicle controller.
  • Send the user's "brake" input to the vehicle handbrake (VehicleController.handbrakeInput)
  • Don't send any brake input to the vehicle (VehicleController.brakeInput = 0)
  • Send the "throttle" input normally (VehicleController.throttleInput)

As long as rear wheels have force enough, that will make a burnout with front wheels braked.

When the user releases the "brake" input, revert the handbrake settings and resume sending the user's "brake" input to VehicleController.brakeInput normally.

...