PhysicsBody

Base class for all objects affected by physics in 3D space.

PhysicsBody is an abstract base class for implementing a physics body. All *Body types inherit from it.

Members

Aliases

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

Functions

_getLayers
long _getLayers()
_setLayers
void _setLayers(long mask)
addCollisionExceptionWith
void addCollisionExceptionWith(Node _body)

Adds a body to the list of bodies that this body can't collide with.

getCollisionExceptions
Array getCollisionExceptions()

Returns an array of nodes that were added as collision exceptions for this body.

getCollisionLayer
long getCollisionLayer()
getCollisionLayerBit
bool getCollisionLayerBit(long bit)

Returns an individual bit on the collisionLayer.

getCollisionMask
long getCollisionMask()
getCollisionMaskBit
bool getCollisionMaskBit(long bit)

Returns an individual bit on the collisionMask.

opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(PhysicsBody other)
opEquals
bool opEquals(typeof(null) n)
removeCollisionExceptionWith
void removeCollisionExceptionWith(Node _body)

Removes a body from the list of bodies that this body can't collide with.

setCollisionLayer
void setCollisionLayer(long layer)
setCollisionLayerBit
void setCollisionLayerBit(long bit, bool value)

Sets individual bits on the collisionLayer bitmask. Use this if you only need to change one layer's value.

setCollisionMask
void setCollisionMask(long mask)
setCollisionMaskBit
void setCollisionMaskBit(long bit, bool value)

Sets individual bits on the collisionMask bitmask. Use this if you only need to change one layer's value.

toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

collisionLayer
long collisionLayer [@property getter]
long collisionLayer [@property setter]

The physics layers this area is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collisionMask property. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masksCollision layers and masks/url in the documentation for more information.

collisionMask
long collisionMask [@property getter]
long collisionMask [@property setter]

The physics layers this area scans for collisions. See url=https://docs.godotengine.org/en/3.3/tutorials/physics/physics_introduction.html#collision-layers-and-masksCollision layers and masks/url in the documentation for more information.

Static functions

_new
PhysicsBody _new()

Construct a new instance of PhysicsBody. Note: use memnew!PhysicsBody 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