Physics2DShapeQueryParameters

Inherits: Reference < Object

Category: Core

Brief Description

Parameters to be sent to a 2D shape physics query.

Member Functions

Array get_exclude ( ) const
int get_layer_mask ( ) const
float get_margin ( ) const
Vector2 get_motion ( ) const
int get_object_type_mask ( ) const
RID get_shape_rid ( ) const
Matrix32 get_transform ( ) const
void set_exclude ( Array exclude )
void set_layer_mask ( int layer_mask )
void set_margin ( float margin )
void set_motion ( Vector2 motion )
void set_object_type_mask ( int object_type_mask )
void set_shape ( Shape2D shape )
void set_shape_rid ( RID shape )
void set_transform ( Matrix32 transform )

Description

This class contains the shape and other parameters for intersection/collision queries.

Member Function Description

  • Array get_exclude ( ) const

Return the list of objects, or object :ref:`RID<class_rid>`s, that will be excluded from collisions.

  • int get_layer_mask ( ) const

Return the physics layer(s) the shape belongs to.

  • float get_margin ( ) const

Return the collision margin for the shape.

Return the current movement speed of the shape.

  • int get_object_type_mask ( ) const

Return the type of object the shape belongs to.

  • RID get_shape_rid ( ) const

Return the RID of the shape queried.

Return the transform matrix of the shape queried.

  • void set_exclude ( Array exclude )

Set the list of objects, or object :ref:`RID<class_rid>`s, that will be excluded from collisions.

  • void set_layer_mask ( int layer_mask )

Set the physics layer(s) the shape belongs to.

  • void set_margin ( float margin )

Set the collision margin for the shape. A collision margin is an amount (in pixels) that the shape will grow when computing collisions, to account for numerical imprecision.

  • void set_motion ( Vector2 motion )

Set the current movement speed of the shape.

  • void set_object_type_mask ( int object_type_mask )

Set the type of object the shape belongs to (see Physics2DDirectSpaceState.TYPE_MASK_*).

Set the Shape2D that will be used for collision/intersection queries.

  • void set_shape_rid ( RID shape )

Set the RID of the shape to be used in queries.

  • void set_transform ( Matrix32 transform )

Set the transormation matrix of the shape. This is necessary to set its position/rotation/scale.