Quantcast
Channel: Question and Answer » libgdx
Viewing all articles
Browse latest Browse all 434

Libgdx: more efficient way of using Vector 3?

$
0
0

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?


Viewing all articles
Browse latest Browse all 434

Trending Articles