Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


How to detect Actor collisions using libgdx and build in box2d?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 Afesh   Members   -  Reputation: 100

Like
0Likes
Like

Posted 25 January 2012 - 07:24 AM

Hi there,
I'm trying to develop my first game for Windows and Android.
After reading a bit about available options i decided that for those given platforms the best choice would be Java + libgdx.
As for my first 2d game it will be simple clone of Missile Command :-).

For now I have some missiles which can be launched to a specific target location (mouse click) with certain speed in pixels/second.
After the missile reaches target it creates Explosion object (Actor) on the screen in given location and the Explosion itself grows until max radius is reached.

I would like to detect collisions between 2 pairs of objects Explosion <-> EnemyMissile and EnemyMissile <-> Building.

I found some tutorials suggesting extending class b2ContactListener in here:
http://blog.allanbishop.com/box2d-2-1a-tutorial-%E2%80%93-part-4-collision-detection/
and
http://box2d.org/forum/viewtopic.php?f=8&p=27546#p27546

But I can't find the b2ContactListener, b2World etc...

Can someone point me to a tutorial or some sources using collision detection in Java with libgdx?

If any more info is needed from my side, please let me know.

Regards
Afesh

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS