Author Topic: How to get object ID by checkForCollisionSpherical?  (Read 1254 times)

Offline orkshaman

  • byte
  • *
  • Posts: 25
    • View Profile
How to get object ID by checkForCollisionSpherical?
« on: March 24, 2011, 11:03:18 pm »
I've got some plane objects - space ships. Check collisions between them works great by checkForCollisionSpherical, but checkForCollisionSpherical translate ships by Zaxis, I only need collision object id. checkForCollision always return -100 (NO_OBJECT), because its plane objects I guess. Sorry for bad english.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11770
    • View Profile
    • http://www.jpct.net
Re: How to get object ID by checkForCollisionSpherical?
« Reply #1 on: March 25, 2011, 08:18:33 am »
The check...Collision methods don't translate anything at all!? It's up to you to use the returned SimpleVector for doing a translation or not. To get the object ids (can be more than one) from a speherical collision detection, register a collision listener on the objects.

Offline orkshaman

  • byte
  • *
  • Posts: 25
    • View Profile
Re: How to get object ID by checkForCollisionSpherical?
« Reply #2 on: March 25, 2011, 04:16:31 pm »
Quote
The check...Collision methods don't translate anything at all!? It's up to you to use the returned SimpleVector for doing a translation or not.
Sorry, I mean its return different SimpleVector.
Quote
To get the object ids (can be more than one) from a speherical collision detection, register a collision listener on the objects.
Thank you.