Documentation ¶
Overview ¶
Package KinematicCollision3D provides methods for working with KinematicCollision3D object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AsKinematicCollision3D() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) GetAngle() Float.X
- func (self Instance) GetCollider() Object.Instance
- func (self Instance) GetColliderId() int
- func (self Instance) GetColliderRid() RID.Body3D
- func (self Instance) GetColliderShape() Object.Instance
- func (self Instance) GetColliderShapeIndex() int
- func (self Instance) GetColliderVelocity() Vector3.XYZ
- func (self Instance) GetCollisionCount() int
- func (self Instance) GetDepth() Float.X
- func (self Instance) GetLocalShape() Object.Instance
- func (self Instance) GetNormal() Vector3.XYZ
- func (self Instance) GetPosition() Vector3.XYZ
- func (self Instance) GetRemainder() Vector3.XYZ
- func (self Instance) GetTravel() Vector3.XYZ
- 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.KinematicCollision3D
Holds collision data from the movement of a [PhysicsBody3D], usually from [method PhysicsBody3D.move_and_collide]. When a [PhysicsBody3D] is moved, it stops if it detects a collision with another body. If a collision is detected, a [KinematicCollision3D] object is returned. The collision data includes the colliding object, the remaining motion, and the collision position. This data can be used to determine a custom response to the collision.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsKinematicCollision3D ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) GetAngle ¶
Returns the collision angle according to [param up_direction], which is [constant Vector3.UP] by default. This value is always positive.
func (Instance) GetCollider ¶
Returns the colliding body's attached [Object] given a collision index (the deepest collision by default).
func (Instance) GetColliderId ¶
Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default). See [method Object.get_instance_id].
func (Instance) GetColliderRid ¶
Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default).
func (Instance) GetColliderShape ¶
Returns the colliding body's shape given a collision index (the deepest collision by default).
func (Instance) GetColliderShapeIndex ¶
Returns the colliding body's shape index given a collision index (the deepest collision by default). See [CollisionObject3D].
func (Instance) GetColliderVelocity ¶
Returns the colliding body's velocity given a collision index (the deepest collision by default).
func (Instance) GetCollisionCount ¶
Returns the number of detected collisions.
func (Instance) GetDepth ¶
Returns the colliding body's length of overlap along the collision normal.
func (Instance) GetLocalShape ¶
Returns the moving object's colliding shape given a collision index (the deepest collision by default).
func (Instance) GetNormal ¶
Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default).
func (Instance) GetPosition ¶
Returns the point of collision in global coordinates given a collision index (the deepest collision by default).
func (Instance) GetRemainder ¶
Returns the moving object's remaining movement vector.