Standard Vehicle Configuration
The JU TPS vehicle class has a base to create any grounded vehicle, you can use the default or create custom vehicles using the base API.
Last updated
The JU TPS vehicle class has a base to create any grounded vehicle, you can use the default or create custom vehicles using the base API.
Last updated
Place the model in the scene > Unpack the prefab > Add colliders, a rigidbody and set vehicle to layer as Vehicle[8]
All vehicles have some default properties, like it:
Vehicles already have properties like Engine, Drive Pad and steering control. The base system hasn't wheels because this needs a different implementation by vehicle type (cars and motorcycles for example, let's see it after).
Okay, let's explain some base vehicle properties.
Base vehicle settings.
Use Default Inputs
If enabled, the vehicle can be controlled by the player using the standard input settings.
Character Exiting Position
Used by the character to exit the vehicle (if is inside the vehicle). Is the local position where the character will be positioned when he stops driving.
Engine contains all vehicle accelerating properties.
Max Forward Speed
Max speed to move to forward.
Max Rear Speed
Max speed to move to backward.
Torque Force
Vehicle acceleration force
Brake Force
Brake force
Acceleration Curve
Represents the engine acceleration force by speed, recommended always set the start as 1 and the end as 0, this makes the vehicle have all acceleration force if is on low speed and very small acceleration if on high speeds, acting as speed limiter too.
Center of Mass
Center of Mass of vehicle, recommended set it to a low value (0, 0, 0) as example, represented as a local position inside the vehicle, it's can help on the stability depending the configuration.
Stores driver control sensitivity.
Rise Rate Throttle
Speed to accelerate the vehicle.
Fall Rate Throttle
Speed to decelerate the vehicle.
Rise Rate Steer
Speed to turn the wheel to some direction.
Fall Rate Steer
Speed to reset wheel rotation when not steering.
Rise Rate Brake
Speed to brake.
Fall Rate Brake
Speed to reset brake.
Some vehicles may have a rollover checker, which returns the car to its original rotation.