Struct Physics2DShapeQueryParameters

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

struct Physics2DShapeQueryParameters ;

This class contains the shape and other parameters for 2D intersection/collision queries. See also Physics2DShapeQueryResult.

Properties

NameTypeDescription
collideWithAreas[get, set] boolIf true, the query will take Area2Ds into account.
collideWithBodies[get, set] boolIf true, the query will take PhysicsBody2Ds into account.
collisionLayer[get, set] longThe physics layer(s) the query will take into account (as a bitmask).
exclude[get, set] ArrayThe list of objects or object RIDs that will be excluded from collisions.
margin[get, set] doubleThe collision margin for the shape.
motion[get, set] Vector2The motion of the shape being queried for.
shapeRid[get, set] RIDThe queried shape's RID. See also setShape.
transform[get, set] Transform2DThe queried shape's transform matrix.

Methods

NameDescription
getCollisionLayer
getExclude
getMargin
getMotion
getShapeRid
getTransform
isCollideWithAreasEnabled
isCollideWithBodiesEnabled
setCollideWithAreas
setCollideWithBodies
setCollisionLayer
setExclude
setMargin
setMotion
setShape Sets the Shape2D that will be used for collision/intersection queries.
setShapeRid
setTransform