PhysicsBody

Inherits: CollisionObject < Spatial < Node < Object

Inherited By: RigidBody, VehicleBody, StaticBody, KinematicBody

Category: Core

Brief Description

Base class for different types of Physics bodies.

Member Functions

void add_collision_exception_with ( Node body )
int get_collision_layer ( ) const
bool get_collision_layer_bit ( int bit ) const
int get_collision_mask ( ) const
bool get_collision_mask_bit ( int bit ) const
void remove_collision_exception_with ( Node body )
void set_collision_layer ( int layer )
void set_collision_layer_bit ( int bit, bool value )
void set_collision_mask ( int mask )
void set_collision_mask_bit ( int bit, bool value )

Member Variables

  • int collision_layer
  • int collision_mask

Description

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

Member Function Description

  • void add_collision_exception_with ( Node body )

Adds a body to the collision exception list. This list contains bodies that this body will not collide with.

  • int get_collision_layer ( ) const
  • bool get_collision_layer_bit ( int bit ) const
  • int get_collision_mask ( ) const
  • bool get_collision_mask_bit ( int bit ) const
  • void remove_collision_exception_with ( Node body )

Removes a body from the collision exception list.

  • void set_collision_layer ( int layer )
  • void set_collision_layer_bit ( int bit, bool value )
  • void set_collision_mask ( int mask )
  • void set_collision_mask_bit ( int bit, bool value )