First post to this forum. Been lurking for a few days.
Just starting to work with JBox2D and am finding it to be quite robust. I have a couple generic questions and a quick search of the forum yielded no (comprehensible) answers to these questions.
Question 1: I am stressing this library as much as possible. I was wondering if I am reaching the limits of what JBox2D can handle, or if it is just because perhaps I am building my project in a less-than-optimal way.
"Caused by: java.lang.ArrayIndexOutOfBoundsException: 2147483647
at org.jbox2d.collision.PairManager.addPair(PairManager.java:115)"
http://www.vimeo.com/1757516
I get this error if I throw in about 1500 to 2000 circles. Is that pretty much the state of things, or is there a way to deal with this limitation?
Question 2: Just starting to use the ContactListener. Was wondering, is there a way to find out if a body is being touched by another body? So far, all I have managed is to get a list of contact points. Ideally, I would just be able to say something like if( body.isColliding ) or something similar.
http://www.vimeo.com/1798697
Anyhow, thanks in advance and I am looking forward to learning this library properly so I can have much more control. I am already impressed quite a bit.
-robert
Just starting to work with JBox2D and am finding it to be quite robust. I have a couple generic questions and a quick search of the forum yielded no (comprehensible) answers to these questions.
Question 1: I am stressing this library as much as possible. I was wondering if I am reaching the limits of what JBox2D can handle, or if it is just because perhaps I am building my project in a less-than-optimal way.
"Caused by: java.lang.ArrayIndexOutOfBoundsException: 2147483647
at org.jbox2d.collision.PairManager.addPair(PairManager.java:115)"
http://www.vimeo.com/1757516
I get this error if I throw in about 1500 to 2000 circles. Is that pretty much the state of things, or is there a way to deal with this limitation?
Question 2: Just starting to use the ContactListener. Was wondering, is there a way to find out if a body is being touched by another body? So far, all I have managed is to get a list of contact points. Ideally, I would just be able to say something like if( body.isColliding ) or something similar.
http://www.vimeo.com/1798697
Anyhow, thanks in advance and I am looking forward to learning this library properly so I can have much more control. I am already impressed quite a bit.
-robert