Documentation
¶
Overview ¶
Package VehicleBody3D provides methods for working with VehicleBody3D object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsCollisionObject3D() CollisionObject3D.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsPhysicsBody3D() PhysicsBody3D.Instance
- func (self Instance) AsRigidBody3D() RigidBody3D.Instance
- func (self Instance) AsVehicleBody3D() Instance
- func (self Instance) Brake() Float.X
- func (self Instance) EngineForce() Float.X
- func (self Instance) SetBrake(value Float.X)
- func (self Instance) SetEngineForce(value Float.X)
- func (self Instance) SetSteering(value Float.X)
- func (self Instance) Steering() Float.X
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.VehicleBody3D
This physics body implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. Aside from a [CollisionShape3D] for the main body of the vehicle, you must also add a [VehicleWheel3D] node for each wheel. You should also add a [MeshInstance3D] to this node for the 3D model of the vehicle, but this model should generally not include meshes for the wheels. You can control the vehicle by using the [member brake], [member engine_force], and [member steering] properties. The position or orientation of this node shouldn't be changed directly. [b]Note:[/b] The origin point of your VehicleBody3D will determine the center of gravity of your vehicle. To make the vehicle more grounded, the origin point is usually kept low, moving the [CollisionShape3D] and [MeshInstance3D] upwards. [b]Note:[/b] This class has known issues and isn't designed to provide realistic 3D vehicle physics. If you want advanced vehicle physics, you may have to write your own physics integration using [CharacterBody3D] or [RigidBody3D].
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCollisionObject3D ¶
func (self Instance) AsCollisionObject3D() CollisionObject3D.Instance
func (Instance) AsPhysicsBody3D ¶
func (self Instance) AsPhysicsBody3D() PhysicsBody3D.Instance
func (Instance) AsRigidBody3D ¶
func (self Instance) AsRigidBody3D() RigidBody3D.Instance