I currently use
if(cam.frustum.pointInFrustum(new Vector3((float)posX, (float)posY, 0)))
To check if my sprite is in the camera’s view. I have to make a new Vector3 every frame wich is very inefficient.
Is there a better way to do this?
I currently use
if(cam.frustum.pointInFrustum(new Vector3((float)posX, (float)posY, 0)))
To check if my sprite is in the camera’s view. I have to make a new Vector3 every frame wich is very inefficient.
Is there a better way to do this?