[Solved] Translating BetterCharacterControl physical object using method .warp() does not update local and world translation


As the title says :

System.out.println("LocalTrans before:"+characterNode.getLocalTranslation());
System.out.println("LocalTrans after:"+characterNode.getLocalTranslation());

It correctly moves characterNode to provided position but not update the local and world translation of it.

Is it a bug ?

You warp the physics object. The physics object updates the spatial location in the update loop.

Ah … Yes , It worked
it is bit tricky :wink:
Actually instantly after warping i was adding a control to my spatial and in that control I was reading the translation of the spatial and got wrong translation.
I changed it to be added after a 2 seconds interval.

Thank you @normen