Closed amityadav381 closed 3 months ago
What do you mean by "without using position"? Do you mean why it rotates in the first step? That's because you change the rotation property?
Hi @AThousandShips , Thanks for your question.
What I mean by "Godot icon revolves even without using "position"" is that: The Godot icon is expected to only rotate in-place in the first step, as we are not updating "position" variable in the script. But when I tried the 1st step, my Godot icon was also revolving around a point outside the Godot icon, when I had not even created/used the variable "position" in my script.
After some playing with some offsets in the Inspector, I was able to make it rotate in-place. Because of this, I think the documentation is missing something about these offsets.
Then you didn't follow the instructions correctly I'd say, make sure you followed the steps exactly, and I'd it still happens please upload your project here, but this is likely an error in following the instructions
I think the documentation missed explaining about what are:
Please upload your example, you're not following the example, if you did it'd work as the gif, you shouldn't change offset
at all, the tutorial doesn't say to do that, that's not part of the tutorial, it's not relevant
Hi @AThousandShips ,
You were right. I made a mistake in following the tutorial. In the final code, I interchanged "speed" with "angular_speed" that's why I was not getting the expected behaviour.
Sorry for the trouble.
I had 2 issues. 1st: Godot icon revolves even without using the position variable in the script. fix: The Godot icon was not centered with Sprite2D. it was at some offset. The tutorial does mention about centering it, but I didn't know what that meant at the time.
2nd: Godot icon was not revolving even after using the position variable as explained in the tutorial script fix: I made a mistake in the script, I accidently replaced speed with angular speed. Which made it look like the icon was rotating in-place.
Both are resolved and now I'm able to move forward with the tutorial. Sorry for the trouble.
Your Godot version: Godot Engine v4.2.2.stable.official.15073afe3
Issue description: Documentation tab "Creating your first scrip" doesn't cover how the Godot icon revolves even without using "position" variable in script.
URL to the documentation page: https://docs.godotengine.org/en/stable/getting_started/step_by_step/scripting_first_script.html#
If you know how to fix the issue you are reporting please consider opening a pull request. We provide a tutorial on using git here: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html, writing documentation at https://docs.godotengine.org/en/stable/community/contributing/docs_writing_guidelines.html and contributing to the class reference here: https://docs.godotengine.org/en/stable/community/contributing/updating_the_class_reference.html