Does anyone know how to do 2D java collision detection not with rectangles AKA things like circles and prefurable not something too complicated around intermediate level.
if you know anything it would really be appreciated
thanks
2D java Collision detection
Page 1 of 16 Replies - 130 Views - Last Post: 02 March 2013 - 04:22 AM
Replies To: 2D java Collision detection
#2
Re: 2D java Collision detection
Posted 23 February 2013 - 04:11 AM
Your statement "not with rectangles AKA things like circles and prefurable not something too complicated" is completely confusing. What do you mean?
#3
Re: 2D java Collision detection
Posted 23 February 2013 - 04:51 AM
by that i mean how would you do collation detection with curved edges instead of strait ones
#4
Re: 2D java Collision detection
Posted 23 February 2013 - 06:55 PM
The easiest way to do collision detection without writing an algorithm yourself is to surround your object with a shape, a Rectangle, Ellipse2D, etc. They all inherit contains() and intersects() from Shape.
#5
Re: 2D java Collision detection
Posted 24 February 2013 - 04:28 AM
thank you that will be very usefull
#6
Re: 2D java Collision detection
Posted 24 February 2013 - 11:10 AM
the Polygon class also has an intersect() method
All shapes can be translate to polygons. More the polygons have points more precise is the intersection
All shapes can be translate to polygons. More the polygons have points more precise is the intersection
#7
Re: 2D java Collision detection
Posted 02 March 2013 - 04:22 AM
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote





|