You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -183,11 +203,17 @@ private bool FindClosestTouchableForLayerMask(LayerMask layerMask, out BaseNearI
183
203
Debug.LogWarning($"Maximum number of {numColliders} colliders found in PokePointer overlap query. Consider increasing the query buffer size in the input system settings.");
/// How many colliders are near the point from the latest call to TryUpdateQueryBufferForLayerMask
242
233
/// </summary>
@@ -290,6 +281,7 @@ public bool TryUpdateQueryBufferForLayerMask(LayerMask layerMask, Vector3 pointe
290
281
Debug.LogWarning($"Maximum number of {numColliders} colliders found in SpherePointer overlap query. Consider increasing the query buffer size in the pointer profile.");
291
282
}
292
283
284
+
CameramainCam=CameraCache.Main;
293
285
for(inti=0;i<numColliders;i++)
294
286
{
295
287
Collidercollider=queryBuffer[i];
@@ -298,7 +290,7 @@ public bool TryUpdateQueryBufferForLayerMask(LayerMask layerMask, Vector3 pointe
298
290
{
299
291
if(ignoreCollidersNotInFOV)
300
292
{
301
-
if(!isInFOVConeCached(collider))
293
+
if(!mainCam.IsInFOVConeCached(collider))
302
294
{
303
295
// Additional check: is grabbable in the camera frustrum
304
296
// We do this so that if grabbable is not visible it is not accidentally grabbed
@@ -316,60 +308,6 @@ public bool TryUpdateQueryBufferForLayerMask(LayerMask layerMask, Vector3 pointe
316
308
returnfalse;
317
309
}
318
310
319
-
320
-
/// <summary>
321
-
/// Returns true if a collider's bounds is within the camera FOV.
322
-
/// Utilizes a cache to test if this collider has been seen before and returns current frame's calculated result.
323
-
/// </summary>
324
-
/// <param name="myCollider">The collider to test</param>
0 commit comments