Chipmunk2D Unity Documentation | Main Page | Forum

Manual

Tutorials

API

Classes

Structs

Enumerations

Chipmunk.NearestPointQueryNearest()

static function NearestPointQueryNearest(point : Vector2, maxDistance : float, layers : uint, group : string, info : out ChipmunkNearestPointQueryInfo) : ChipmunkShape

Parameters


pointThe point at which you want to find the nearest shape.
maxDistanceThe maximum distance to look for nearby shapes.
layersThe Chipmunk layer bitmask of the layers you want to query against.
groupThe Chipmunk group identifier you want to filter out.
infoAn out parameter to a ChipmunkNearestPointQueryInfo struct that will contain additional information about the nearest shape.

Returns

ChipmunkShape - The nearest shape within maxDistance of point.

Description

Return only information about the nearest shape to the query point.

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