Vehicle |
A basic class to make vehicles of various types. An example scene is in 'Samples\Starter Content\Scenes\Vehicle.scene'.
Right now, the component supports making only cars and trucks with simple physics.
The vehicle is created like other objects, the easiest way to do this is to drop it into the scene from the Resources Window.
In order to configure vehicle control by a player, you need to configure the properties of the Game Mode object. This object is in the scene. 'Object Controlled By Player' property should point to the vehicle. You also need to configure the type of camera using the 'Use Built In Camera' property (for example, select Third Person).
Now by launching the Player App, you can control the vehicle in a first-person view.
The vehicle is customizable using properties and nested components. By default, the vehicle contains a 3D model, a physical body, a component for controlling the player, and artificial intelligence.
The vehicle can be configured as a separate file with the extension .vehicle.
You can configure a new vehicle in the scene and then save it to a file by means 'Save To File' item of the context menu.
In order to create vehicle types, it is not necessary to create a .vehicle file. You can use the scene and the vehicle created in it as a type. To do this, select the scene file in the Resources Window and click '+'. In the expanded list there will be scene objects that can be dragged and dropped into another scene.
Name | Description |
---|---|
Simulation Mode | The method of simulating the vehicle. |
Chassis | The type of chassis. |
Front Wheel Position | The position offset for front wheels. |
Front Wheel Diameter | The diameter of a front wheel. |
Front Wheel Width | The width of a front wheel. |
Front Wheel Mass | The mass of a front wheel. |
Front Wheel Mesh | The mesh of a front wheel. |
Rear Wheel Position | The position offset for rear wheels. |
Rear Wheel Diameter | The diameter of a rear wheel. |
Rear Wheel Width | The width of a rear wheel. |
Rear Wheel Mass | The mass of a rear wheel. |
Rear Wheel Mesh | The mesh of a rear wheel. |
Wheel Drive | The drive wheel type. |
Wheel Friction | The physics material friction of the wheels. |
Suspension Travel | The range of suspension travel. |
Spring Rate | The spring rate of the chassis. |
Throttle Target Velocity | The maximal target velocity of throttle. |
Throttle Force | The maximal physical force of throttle. |
Brake Force | The maximal brake force. |
Steering Force | The maximal steering force. |
Max Steering Angle | The maximal steering angle. |
Debug Visualization | Whether to visualize debug info. |
Throttle | The throttle parameter to control the vehicle. |
Brake | The brake parameter to control the vehicle. |
Steering | The steering parameter to control the vehicle. |
Health | The health of the vehicle. |