Author Topic: How to avoid the creating of new objects in Collision detection.  (Read 1509 times)

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
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:

« Last Edit: August 28, 2013, 05:37:41 am by kiffa »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: How to avoid the creating of new objects in Collision detection.
« Reply #1 on: August 28, 2013, 09:39:17 am »
Is there any way to avoid this?
No, there isn't. Object creation in that method is already down to the bare minimum.