Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to find collision between balls in Applet animation

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to find collision between balls in Applet animation

    I'm trying to create a animation in which a bomb falls down and there is three balloon moving from left to right.
    I want to know how would i come to know bomb hit ball.
    I've tried to locate by making co-ordinate equals but its come out wrong.
    Can you give any idea pls !!!


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,332
    My Mood
    Hungover
    Thanks
    143
    Thanked 624 Times in 535 Posts

    Default Re: How to find collision between balls in Applet animation

    There are plenty of ways to do collision detection, and google is your friend here.

    One way is to simply measure the distance between the Objects- if it's less than the sum of both their radii, they're colliding.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Collision
    By risen375 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: June 28th, 2011, 07:02 AM
  2. Bouncing Balls
    By roza in forum Threads
    Replies: 6
    Last Post: June 7th, 2011, 10:10 AM
  3. Blender file with animation, how to import OBJ(w/ animation) into Java?
    By cr80expert5 in forum Object Oriented Programming
    Replies: 0
    Last Post: May 12th, 2011, 03:11 AM
  4. Applet cannot find client.class?
    By JoshRod in forum What's Wrong With My Code?
    Replies: 0
    Last Post: April 18th, 2010, 05:17 PM
  5. Problem with my animation applet
    By cBlue in forum Java Applets
    Replies: 1
    Last Post: December 9th, 2009, 06:49 PM