www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: orkshaman on March 24, 2011, 11:03:18 pm

Title: How to get object ID by checkForCollisionSpherical?
Post by: orkshaman 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.
(http://img192.imageshack.us/img192/5153/hmmvk.png)
Title: Re: How to get object ID by checkForCollisionSpherical?
Post by: EgonOlsen 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.
Title: Re: How to get object ID by checkForCollisionSpherical?
Post by: orkshaman 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.