Move in global space while rotating

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By tom555

I need to make fall a floor chunk and make it slightly rotate while falling.
I’m not using rigid body or animations here, I want pure code approach and the node is MeshInstance.

I tried both translate() and translate_object_local() with either rotate() and rotate_object_local() but the node keeps translating in the direction of its local axis.
The result is that the node travels in circles in the air instead of moving along the global negative y axis.

How can I make it translate in global space?

:bust_in_silhouette: Reply From: lewis glasgow

transform.origin += Vector3(0,0,0)

OMG that’s so obvious and so genious, thank you! :smiley:

tom555 | 2021-08-03 18:51