Possible problems with collisions in latest cvs

It all seems to work fine when I use the latest stable release but running from the cvs I notice a few problems



firstly, it doesn’t build on java 1.4, due to using Integer.getValue(int) in some of the odejava code. I think simply changing this to new Integer(int) sorts it out (at the expense of some efficiency). However, if this has caused the other problems, please ignore the rest of this post (sadly those of use who are Mac users don’t have java 1.5 yet, though it’s out soon)



secondly, even with the change above, seems like there’s a bit of an inconsistency with the getNormal(Vector3f normal) method in org.odejava.collision.Contact and …BulkContact classes - the return types are inconsistent (one is void, the other Vector3f) which causes a compiler break.



and thirdly - when I fix the above, collisions with static objects don’t seem to work (e.g. CompoundedObjectTest - you can shoot the objects but they fall through the floor)



it’s possible of course that I broke this by fixing the other issues as I’m meddling with stuff I don’t really understand…



any help gratefully appreciated…

"bm212" wrote:
firstly, it doesn't build on java 1.4, due to using Integer.getValue(int) in some of the odejava code.

Oh, thought that was available in 1.4, too - is fixed.
"bm212" wrote:
I _think_ simply changing this to new Integer(int) sorts it out (at the expense of some efficiency).
That's true
"bm212" wrote:
secondly, even with the change above, seems like there's a bit of an inconsistency with the getNormal(Vector3f normal) method in org.odejava.collision.Contact and ...BulkContact classes - the return types are inconsistent (one is void, the other Vector3f) which causes a compiler break.
Strange, was not checked in - sorry
"bm212" wrote:
and thirdly - when I fix the above, collisions with static objects don't seem to work (e.g. CompoundedObjectTest - you can shoot the objects but they fall through the floor)
Hmm, I cannot even run it after updating to latest CVS Version: NullPointerException - i'll have a look at it...

k, test is working again



Fixing the NPE was not enough (yes, that’s why you got objects falling through the floor). There are still some problems with StaticPhysicsObject (it was changed lately to allow compound objects (Nodes) ). I think DP should have a look at it because I only made a quick-fix…

well, that’ll teach me to meddle with things I don’t understand…



thanks for the fix



BTW, is there a nightly build off the CVS? I don’t know if sourceforge can set this sort of thing up or not but it’d be a good thing to have I reckon

yep - nightly builds would be really nice - but sf does offer them for money only.



One could set up the ant scripts to automatically compile and test things somewhere (we even have a little unit test) - when someone can spare time and resources for this I would really appreciate that!


I think DP should have a look at it because I only made a quick-fix...


Oh oh! ://

I'l have a look at it ASAP. Btw, what modifications have you done irrisor to fix it? Just so that i know whats wrong...

DP

I initialized the ‘geoms’ ArrayList when only ‘phyObject’ was used, too - putting the single geom in there… maybe we should remove the phyObject field (or move it into DynamicPhysicsObjects) ?

yer, i was thinking of removing the phyObject from PhysicsObject completely and making isSynced() an abstract method in PhysicsObject. That would be a clean solution as DynamicPhysicsObject and StaticPhysicsObject can then use their own ode representations and not need to worry about being compatible with Placeable.



Also, i plan on splitting PhysicsEntityCreator so that static objects are created by one creator and dynamic objects are created by another.



I’l do that when i get home (around 8 hours :()



DP

Ok, i managed to sneek in a few minutes. I fixed the static objects properly and refactored the PhysicsObjects stuff…Its much cleaner now.



Also, i removed the CompoundedStaticObjectTest and instead i made the floor in CompoundedObjectTest a compounded static object instead.



DP