VehicleWheel Properties |
The VehicleWheel type exposes the following members.
Name | Description | |
---|---|---|
_ImportPath | (Inherited from Node.) | |
Brake | Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the Mass of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. | |
CustomMultiplayer | The override to the default MultiplayerAPI. Set to null to use the default SceneTree one. | |
DampingCompression | The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car. | |
DampingRelaxation | The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the DampingCompression property. For a DampingCompression value of 0.3, try a relaxation value of 0.5. | |
DynamicObject |
Gets a new DynamicGodotObject associated with this instance.
(Inherited from Object.) | |
EditorDescription | (Inherited from Node.) | |
EngineForce | Accelerates the wheel by applying an engine force. The wheel is only speed up if it is in contact with a surface. The Mass of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. Note: The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. A negative value will result in the wheel reversing. | |
Filename | When a scene is instanced from a file, its topmost node contains the filename from which it was loaded. | |
Gizmo | The SpatialGizmo for this node. Used for example in [!:Godot.EditorSpatialGizmo] as custom visualization and editing handles in Editor. | |
GlobalTransform | World space (global) Transform of this node. | |
Multiplayer | The MultiplayerAPI instance associated with this node. Either the CustomMultiplayer, or the default SceneTree one (if inside tree). | |
Name | The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed. Note: Auto-generated names might include the @ character, which is reserved for unique names when using AddChild(Node, Boolean). When setting the name manually, any @ will be removed. | |
NativeInstance | (Inherited from Object.) | |
Owner | The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using PackedScene), all the nodes it owns will be saved with it. This allows for the creation of complex SceneTrees, with instancing and subinstancing. | |
PauseMode | Pause mode. How the node will behave if the SceneTree is paused. | |
ProcessPriority | The node's priority in the execution order of the enabled processing callbacks (i.e. , and their internal counterparts). Nodes whose process priority value is lower will have their processing callbacks executed first. | |
Rotation | Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). Note: In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a Vector3 data structure not because the rotation is a vector, but only because Vector3 exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. | |
RotationDegrees | Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). | |
Scale | Scale part of the local transformation. | |
Steering | The steering angle for the wheel. Setting this to a non-zero value will result in the vehicle turning when it's moving. | |
SuspensionMaxForce | The maximum force the spring can resist. This value should be higher than a quarter of the Mass of the VehicleBody or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. | |
SuspensionStiffness | This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car. | |
SuspensionTravel | This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car. | |
Transform | Local space Transform of this node, with respect to the parent node. | |
Translation | Local translation of this node. | |
UseAsSteering | ||
UseAsTraction | If true, this wheel transfers engine force to the ground to propel the vehicle forward. This value is used in conjunction with EngineForce and ignored if you are using the per-wheel EngineForce value instead. | |
Visible | If true, this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, IsVisibleInTree must return true). | |
WheelFrictionSlip | This determines how much grip this wheel has. It is combined with the friction setting of the surface the wheel is in contact with. 0.0 means no grip, 1.0 is normal grip. For a drift car setup, try setting the grip of the rear wheels slightly lower than the front wheels, or use a lower value to simulate tire wear. It's best to set this to 1.0 when starting out. | |
WheelRadius | The radius of the wheel in meters. | |
WheelRestLength | This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest. | |
WheelRollInfluence | This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll. |