Physics2DShapeQueryParameters

Inherits: Reference < Object

Category: Core

Brief Description

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

Member Functions

int get_collision_layer ( ) const
Array get_exclude ( ) const
float get_margin ( ) const
Vector2 get_motion ( ) const
int get_object_type_mask ( ) const
RID get_shape_rid ( ) const
Transform2D get_transform ( ) const
void set_collision_layer ( int collision_layer )
void set_exclude ( Array exclude )
void set_margin ( float margin )
void set_motion ( Vector2 motion )
void set_object_type_mask ( int object_type_mask )
void set_shape ( Resource shape )
void set_shape_rid ( RID shape )
void set_transform ( Transform2D transform )

Description

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

Member Function Description

  • int get_collision_layer ( ) const

Return the list of objects, or object RIDs, that will be excluded from collisions.

  • Array get_exclude ( ) const

Return the list of objects, or object RIDs, that will be excluded from collisions.

  • 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_collision_layer ( int collision_layer )

Set the list of objects, or object RIDs, that will be excluded from collisions.

  • void set_exclude ( Array exclude )

Set the list of objects, or object RIDs, that will be excluded from collisions.

  • 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.

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