Chipmunk2D Unity Documentation | Main Page | Forum

Manual

Tutorials

API

Classes

Structs

Enumerations

Chipmunk.SegmentQueryFirst()

static function SegmentQueryFirst(start : Vector2, end : Vector2, layers : uint, ground : string, info : out ChipmunkSegmentQueryInfo) : ChipmunkShape

Parameters


startStarting point of the segment query.
endEnding point of the segment query.
layersThe Chipmunk layer bitmask of the layers you want to query against.
groundThe Chipmunk group identifier you want to filter out.
infoAn out parameter to a ChipmunkSegmentQueryInfo struct that will contain additional information about the first shape hit.

Description

Return only the first shape struck by the segment query as it goes from start to end.

Shapes are filtered using the group and layers in the same way as collisions.