[solved] add documentation to JME?

Hi,



I've been searching for errors in my program which I thought was quite strange, I was modelling cylinders and boxes in 3D and the problem was determining their height by the lenght of a mouse move. It worked perfectly with the cylinders, but for some reason not for the boxes, which ran on almost the same code. Finally I realized that the getWorldTranslation() function only returns how much the object has been translated during the program.



The problem I had was that when I created a box I also supplied the startposition for it. The problem was that this startposition was not regarded as an translation. With the cylinder I didn't supply a startingposition, so this lead to a situation that was quite hard to debug.



My suggestion is that this is made a bit clearer in the documentation, since it is a quite basic thing which you expect to behave in a certain way. This is the last thing you think is wrong. For an example you could just mention in the constructor for box that setting the origin is not counting towards the worldtranslation, or something similar.



What do you think about this?

Yes with the worldtranslate there is something like a "temporary" bug! It has not always the right value. After setting a localTranslation this localTranslation is written (for some reason) in the worldtranslation and is not the right value unitl updateWorldTranslation is called.



Have a look in this thread:

http://www.jmonkeyengine.com/forum/index.php?topic=12164.msg90508;topicseen#msg90508


okay, thx!



I didn't know that the worlddata could be "dirty", but that's really good to know! :slight_smile: