KinematicCollision

Collision data for KinematicBody collisions.

Contains collision data for KinematicBody collisions. When a KinematicBody is moved using KinematicBody.moveAndCollide, it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getCollider
GodotObject getCollider()
getColliderId
long getColliderId()
getColliderMetadata
Variant getColliderMetadata()
getColliderShape
GodotObject getColliderShape()
getColliderShapeIndex
long getColliderShapeIndex()
getColliderVelocity
Vector3 getColliderVelocity()
getLocalShape
GodotObject getLocalShape()
getNormal
Vector3 getNormal()
getPosition
Vector3 getPosition()
getRemainder
Vector3 getRemainder()
getTravel
Vector3 getTravel()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(KinematicCollision other)
opEquals
bool opEquals(typeof(null) n)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

collider
GodotObject collider [@property getter]

The colliding body.

colliderId
long colliderId [@property getter]

The colliding body's unique instance ID. See GodotObject.getInstanceId.

colliderMetadata
Variant colliderMetadata [@property getter]

The colliding body's metadata. See GodotObject.

colliderShape
GodotObject colliderShape [@property getter]

The colliding body's shape.

colliderShapeIndex
long colliderShapeIndex [@property getter]

The colliding shape's index. See CollisionObject.

colliderVelocity
Vector3 colliderVelocity [@property getter]

The colliding object's velocity.

localShape
GodotObject localShape [@property getter]

The moving object's colliding shape.

normal
Vector3 normal [@property getter]

The colliding body's shape's normal at the point of collision.

position
Vector3 position [@property getter]

The point of collision, in global coordinates.

remainder
Vector3 remainder [@property getter]

The moving object's remaining movement vector.

travel
Vector3 travel [@property getter]

The distance the moving object traveled before collision.

Static functions

_new
KinematicCollision _new()

Construct a new instance of KinematicCollision. Note: use memnew!KinematicCollision instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta