0 votes

In Godot 3, I made a small, 3rd-person car game to practice using Godot, and I used a Spring Arm with a script I wrote with the help of a tutorial. However, that tutorial told me to use the translation keyword to assign the Spring Arm's translation to the car, and then specifically to set the y translation.

The code

When I copied the script over to Godot 4, I had a few errors which I expected and removed, however I can't figure out how to fix this one. It treats "translation" as if it's a variable name, however Godot 3 treats it as the car's position, which I want.

I would just leave the Spring Arm parented to the car, but it also rotates with the car and I don't want that.

Godot version Godot 4 alpha 12
in Engine by (15 points)

1 Answer

+2 votes
Best answer

translation was renamed to position in Godot 4 for consistency between 2D and 3D.

by (21,716 points)
selected by

Thank you so much for this I was pulling my hair out and I couldn't find it in the documentation anywhere.

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.