Center of mass in physic2

Hi, I have a problem with the dynamicNode.setCenterOfMass

When I don't put it my dynamicNode move a certain way

When I adjust the CenterOfMass it doesn't turn any more

and when i write dynamicNode.setCenterOfMass(dynamicNode.getCenterOfMass(null)); it still doesn't turn

If you have any suggestion that would be nice

setCenterOfMass works fine in the tests over here. Can you post a small example application to show your problem?

Hi i didn't find the way to post files so i send you a mail at your dev.java.net adress



thanks for taling time for ansewring me



thomas

Please post/send a single java file as test case - your complete software package does not compile over here (I didn't figure out the correct configuration, it seems).



Maybe you can try to get the same behaviour from one of the tests in cvs. Then post something like "insert line xy into TestX, line ab -> objects behave strange". This way we could narrow down the problem.

you can't post files here btw. only links to your own webspace

The problem is that i dont have any webspace…

I try to make an example in one file and i'll post it



again thanks for your attention

I've just send you the example of my problem i must be doing something wrong but i don't know what

I'd be glad if you could tell me what

Well, I can't make out any difference in your test with or without the marked line. Do you expect it to change something? Do you experience different behaviour? If yes which version do you use - current cvs or a beta release?

well there was a big difference but i'm suspecting i was using a beta version if it is the problem i do apologies for wasting your time

well i am using the beta2 version which seems to be the latest… where can i find the CVS version?

Hi, one again I have a problem… i tried to build a jar file from the CVS compilation… but when i come back to my files i don't have any more rootNode and my dynamicNode don't accept anymore attachchild…

i must admit i am not very familiar with CVS and with jar making… if you could build a new jme-physics.jar… that would be very nice from you



thomas

ok, got it! :slight_smile:



Just checked with beta2 (it's fine when you are using that one, btw, no waste of time or anything) : setCenterOfMass was setting the mass to the material default. It's fixed in cvs.



You don't need to use the cvs version. I will make a jar for the next release some time. Until then you can simply swap your lines with setMass and setCenterOfMass - it works when you call setMass afterwards.



Thanks for discovering this bug!