0 votes

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 translateobjectlocal() with either rotate() and rotateobjectlocal() 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?

Godot version 3.3.2
in Engine by (12 points)

1 Answer

0 votes

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

by (266 points)

OMG that's so obvious and so genious, thank you! :D

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.