AS3 code doesn't really do things the right way. I was trying to keep it semi-compatible with porting to C++. All C++ pointers become arrays with a single element. At least that idiom is easy to translate. IMHO only the Python port does it the "right" way.
Box2D Java
JavaI've never contributed code before. um.... how would you need me to do it? I'm using netbeans on windows. I have tortiseSVN and i think i could make a patch with that. Would that work?
I can't give SVN access myself (I'm not the project leader on SourceForge and I'm not sure how often quixote_arg checks in these days, so it would probably take a while to get it set up), so the simplest thing is probably to just send the altered files as a .zip. As long as you start from the latest SVN version this should be easy enough to merge by hand.
well, here is a first attempt. I only implemented circle and polygon tests. The sortkeyfunc on some of the functions is also not implemented. I only tested polygons.
freakypie wrote:
... I only implemented circle and polygon tests. The sortkeyfunc on some of the functions is also not implemented. I only tested polygons.
I'm testing this out a bit, thanks for handling the port!
I'm only using circles and polygons as well, I'm wondering if the above "sortkeyfunc" might account for my seeing the occasional odd behaviour. Sometimes the array returned from World.raycast(...) is out of order. If I understand it correctly, the shapes should be in order from nearest to farthest? I'm trying to "tag" the nearest shape of a certain type on the ray, and sometimes it seems the 2nd shape is tagged.
I'll look into this further, but if anyone has any insights they'd be appreciated.
Bill
Sounds like a genuine bug. You should always find the returned array is sorted by sortkeyfunc. But I wrote my own insertion sort (always a bad sign), so it might well not like it much.
Sorry I haven't had a chance to take a look at this yet, I'm heading out of the country and am very busy at the moment - at some point next week I'll see what's going on and try to get things integrated.
No problem, thanks for the replies. I'll poke around and see if anything stands out.
Bill
Bill
Hi,
are there any news on the raycast port?
I hope this don't seems like i'm making demands,
but i'm really looking forward to use this feature.
BTW thanks for porting so far,
it's amazing fast for java-means.
are there any news on the raycast port?
I hope this don't seems like i'm making demands,
but i'm really looking forward to use this feature.
BTW thanks for porting so far,
it's amazing fast for java-means.
Hello, I am trying to build a "pendulum":
- Max angle at 45% and -45%
- No damping (no acceleration, constant speed)
Here is the current structure:

WIth these 2 RevoluteJoint the proj Body is stuck.
I've tried adding motors to both joints but can't achieve the desired result.
Any idea?
- Max angle at 45% and -45%
- No damping (no acceleration, constant speed)
Here is the current structure:

WIth these 2 RevoluteJoint the proj Body is stuck.
I've tried adding motors to both joints but can't achieve the desired result.
Any idea?
Original thread: https://box2d.org/forum/viewtopic.php?t=36