getLocalTranslation then setLocalTranslation = problems


I have a Node that I am creating when an object is instantiated. The Node is then positioned. This object has an update method, which is called every time-step. In this method, I want to move the point about. In doing so, I found that the code underneath actually moves the point; even though if I print out the localtranslation before and after, it is the same.

Vector3f midPointSlide = midPoint.getLocalTranslation();

Can anyone think why this might happen? Surely it should make no difference at all. It's even the same Vector3f object...

Perhaps a quick test showing the exact issue?

(also, I assume you know you are setting the Vector3f reference not the values right?)

Your code above does pretty much nothing.

Maybe your node is moved by a parent node, is it attached to a moving node?

LocalTranslation (relative position to parent) would not change in that case, only its worldTranslation (absolute position).

Also be sure to understand the difference between getLocalTranslation().set(Vector3f) and setLocalTranslation(Vector3f);