The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+2 votes

In Spatial nodes I suppose translateobjectlocal is supposed to translate the object in its own local coordinates considering its scale and rotation. In practice it works like this but in my tests it also behaves identically to translate, both translate the object using the object's local coordinates. My question is regarding the latter: is Spatial's "translate" supposed to be any different to translateobjectlocal? Is translate's current implementation correct?

I made a simple test scene to apply both methods on two cube objects. One without rotation and another rotated. Both move the same with both translate and translateobjectlocal

in Engine by (20 points)

2 Answers

+1 vote

Logically I would think that the local space one would move in the object's axis before all worldspace transformations (so if you used its z axis and then rotated it it would still move forward. I tested it, too, and it doesn't do that. So I second your question about its implementation.

by (24 points)

I think this should be a comment, not a question.

+1 vote

To answer myself, it seems like they don't consider having two functions that do the same thing a bug:
We have global translate, local translate and translate that is the same as local translate. I don't get it. To add to this, rotate and rotate local both exist, but rotate does work on parent coordinates.

by (20 points)
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 Frequently asked questions and 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 [email protected] with your username.