public static bool OverlapCircle(Fix64Vec2 center, Fix64 radius, int mask, PShapeOverlapResult2D shapeOverlapResult) { if (!initialized) { Initialize(); } int count = 0; bool hit = NativeParallel2D.CircleOverlap(internalWorld.IntPointer, center, radius, mask, _queryBodyIDs, ref count); shapeOverlapResult.count = count; for (int i = 0; i < count; i++) { UInt16 bodyID = _queryBodyIDs[i]; if (bodySortedList.ContainsKey(bodyID)) { shapeOverlapResult.rigidbodies[i] = bodySortedList[bodyID].RigidBody; } else { Debug.LogError($"Rigibody not found: {bodyID}"); } } return(hit); }
//overlap public static bool OverlapCircle(Fix64Vec2 center, Fix64 radius, PShapeOverlapResult2D shapeOverlapResult) { return(OverlapCircle(center, radius, -1, shapeOverlapResult)); }