VehicleBody3D

package
v0.0.0-...-d9f4d4e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package VehicleBody3D provides methods for working with VehicleBody3D object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsVehicleBody3D() Instance
}

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 New

func New() Instance

func (Instance) AsCollisionObject3D

func (self Instance) AsCollisionObject3D() CollisionObject3D.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode3D

func (self Instance) AsNode3D() Node3D.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsPhysicsBody3D

func (self Instance) AsPhysicsBody3D() PhysicsBody3D.Instance

func (Instance) AsRigidBody3D

func (self Instance) AsRigidBody3D() RigidBody3D.Instance

func (Instance) AsVehicleBody3D

func (self Instance) AsVehicleBody3D() Instance

func (Instance) Brake

func (self Instance) Brake() Float.X

func (Instance) EngineForce

func (self Instance) EngineForce() Float.X

func (Instance) SetBrake

func (self Instance) SetBrake(value Float.X)

func (Instance) SetEngineForce

func (self Instance) SetEngineForce(value Float.X)

func (Instance) SetSteering

func (self Instance) SetSteering(value Float.X)

func (Instance) Steering

func (self Instance) Steering() Float.X

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL