How to avoid the creating of new objects in Collision detection.

Started by kiffa, August 28, 2013, 05:32:14 AM

Previous topic - Next topic

kiffa

In my game, I called Object3D.checkForCollisionEllipsoid() per frame, and I found there are some creating of new objects per call(Seems they are CollisionInfo and SimpleVector).

Is there any way to avoid this? I use the Allocation Tracker tool of Android to do the profiling, and there is the report:


EgonOlsen

Quote from: kiffa on August 28, 2013, 05:32:14 AM
Is there any way to avoid this?
No, there isn't. Object creation in that method is already down to the bare minimum.