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