"Teleportation" of a PhysicsNode

How would you achieve the effect of teleportation of a PhysicsNode? As setLocalTranslation() won't work directly on the PhysicsNode while the simulation is running, I wondered if there was any other way? I believe jMEphysics1 had some kind of syncWithGraphical() method?



Thanks in advance,

joh

update the position and then syncWithGraphical. :-p  (or whatever the method is in jME-Physics2)

darkfrog said:

update the position and then syncWithGraphical. :-p  (or whatever the method is in jME-Physics2)


That's the problem - what's the method called in jMEphysics2? :P

There is no such method. It simply works with setLocalTranslation.



What was the problem?

irrisor said:

There is no such method. It simply works with setLocalTranslation.

What was the problem?


Ah I see, it works as long as the node isn't connected by some sorts of Joint. If it is I guess I have to make a TranslationalJointAxis but this would accelerate the node and thus push the node it's connected to in the other direction - which is not what I want. I simply want to move it to the left or right without any forces affecting the node it's connected to. Is this possible?

you can reattach the joints after moving it to reset them - do you mean this?

irrisor said:

you can reattach the joints after moving it to reset them - do you mean this?


Ah, excellent idea! I'll just detach it and then reattach it! Thanks alot! :D

…could have sworn I saw a method for that in 2…maybe it was the other direction?  Sync graphical with physics?

darkfrog said:

....could have sworn I saw a method for that in 2....maybe it was the other direction?  Sync graphical with physics?

no, not in the api. The OdeJava implementation has such methods, but you can't invoke them from outside.