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
In Camera.cull, culledObjects is to be populated by objects within the camera area, but currently returns all objects given no matter what because the area is being checked with OR instead of AND. if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || tw > -objectW || th > -objectH || tw < cullW || th < cullH) { culledObjects.push(object); }
Can be fixed by changing all ORs to ANDs if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH && tw > -objectW && th > -objectH && tw < cullW && th < cullH) { culledObjects.push(object); }
The text was updated successfully, but these errors were encountered:
In Camera.cull, culledObjects is to be populated by objects within the camera area, but currently returns all objects given no matter what because the area is being checked with OR instead of AND.
if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || tw > -objectW || th > -objectH || tw < cullW || th < cullH) { culledObjects.push(object); }
Can be fixed by changing all ORs to ANDs
if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH && tw > -objectW && th > -objectH && tw < cullW && th < cullH) { culledObjects.push(object); }
The text was updated successfully, but these errors were encountered: