Tuesday, 15 July 2014

android - how toget x and y cooridinates of sprit2 when sprite1 collides with it in AndEngine -


How to get the x and y coordinates of sprit2 when sprite1 collides with it I need to use the collision update handler then Happens when the Phantom collides with 1 Spread 2, at the point where it is enclosed with Sprite 2 where it collides? Thank you.

Try using the Box2D extension for Aurangine basically lets you physics bodies to sprites So, you use a contact listener to take care of the events of conflicts here that you will get the contact point of collision in the listener ...

  Create a secure contact listenerConstelester () { New Contact Listener () {Public Zero Start Contact ( Nprk contact) [{vector 2] Snprkpoints = contact.getWorldManifold (). GetPoints (); (Int i = 0; i & lt; contactPoints.length; i ++) {...} ...}}}    

No comments:

Post a Comment