Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.
Making collision shape child of sprite for rotationprivate-dragonflyIf we had a non-uniform collision shape (rectangular for example), would moving the collision shape inside of the sprite 2D so that it rotates with the sprite be appropriate?
Or would it be better in this case to keep them sibling nodes and rotate the collision shape on another line312Mar. 02, 2024
Using Unique Name instead of get_node() ?RaspiWould it be beneficial in any way to use a UniqueName instead of the get_node() way? Will it be "better" in terms of performance in the long run? (for big things, not small projects like this)
Or alternatively , storing the node in a onReady function?
I'd imagine for tutorial purposes and to keep things focused in the healthbar rotation etc. makes more sense to directly use the get_node().
Thanks and keep it up!37Feb. 21, 2024
Whether the health progress bar can be modularizedpast-muleCan I create health in a new node and add it to the Ship? So I can reuse the health progress bar node in different monsters, characters, items without creating a health progress bar each time, is this reasonable?32Feb. 20, 2024
Attaching a script to the Sprite2D for rotation.Tarek_MouradIs it possible to attach a script to the sprite and manipulate the rotation at the process function of the sprite? If so, isn't that more organized to do, having all the functions related to the sprite at the sprite node itself or it is better for readability to have all that at the same script?11Apr. 25, 2024
My Inspector didn't show the StyleBoxFlat propertiesfront-railWhen I got to styles and set it to StyleBoxFlat, it ticked the "fill" box, but it didn't show any additional settings to change colors etc. Did I miss a step or something? 20Oct. 31, 2024
Suggestion: Allow mouse wheel to change Inspector valuesbunshinesoyI see that you can use the up and down arrow keys to change values in the inspector. It'd be nice if you can use mouse wheel scrolling to also change the values. I'm used to this behavior from photoshop/lightroom and feels like it would naturally fit in here.10Oct. 20, 2024
What would be a use case for "StyleBoxLine"?stark-echidnaIn the lesson it is said that StyleBoxLine is rarely used. But what would be an actual use case?10Sep. 17, 2024
Nodes Control and more HazlarHello everyone,
In the node tree, node2D and Control appear as a spacer indicating a general category, are they used in usage as a visual use of readability with the power to modify all of its children that share the same properties. I duplicated the HealthBar and then modified the color via the Control node and this has indeed modified the colors of the two bars at the same time.
To summarize:
Are the Node2D or control nodes nodes that express a general category? Are they used mainly as a visual spacer in our dock so that it is visually more structured?
For Area2D I see that its general category is CollisonObject2D, should we have defined it upstream before our Area2D?
Thanks in advance30Jun. 23, 2024
Sprite rotation and lerp_anglep_dev_In a previous lesson, I had used the code to lerp the angle of the ship.
When seeking to avoid the rotation of the health bar, I tried the following code in the ship script:
```gdscript
func _process(delta: float) -> void:
#...
var target_rotation = velocity.angle()
get_node("Sprite2D").rotation = lerp_angle(rotation, target_rotation, delta * 7)
```
But the ship just starts rotating very slightly, and doesn't complete the movement. Where could the problem be?20Jun. 22, 2024
UI Control node as parent?machinemanI noticed we created Control node to serve as the parent of the progress bar... but could we just have the progress bar node? What is the reason for creating the parent?10May. 05, 2024
No slider available with progress bar's value property?leafNothing major here, but I was looking all over the place for the slider mentioned in the lesson text for the `value` property, either I have missed this altogether, or it does not exist (anymore?). Caused a slight of confusion for me, will likely cause confusion for other students in the future as well!10Apr. 21, 2024
Small improvement to the lessonAlainYou should take the opportunity when talking about this line:
```gdscript
get_node("Sprite2D").rotation = velocity.angle()
```
To explain it could be replaced with
```gdscript
$Sprite2D.rotation = velocity.angle()
```
As we see a lot of usage of the ` operator on the web and it is not obvious how to use it at first.10Apr. 05, 2024
Do you have any topics on theming?iadgybf8iawgFor example, dark/light ui mode, consistant UI theme for different ui elements, reusable UI component etc.10Mar. 14, 2024
Show pixels info for position and sizeGreg GGTIn the "Move and resize the health bar" part:
In the second GIF, you have information on the position and size of the pixels that appear when the progress bar is resized and moved.
How can I see this information too?
Thx :)30Mar. 02, 2024
Theme override is missing?old-fashioned-elephantThis isn't really related to the course but I am using the version of Godot that came with the lesson files for this module and I do not have "theme overrides" in my Control settings. The last item in that section is"Theme" could I be missing something?60Feb. 28, 2024
UI placementTrifidehi there, i was playing a little with the UI on later lessons and i saw that it goes under the collectibles, why is that and should'nt it be the other way arround?20Feb. 23, 2024
Typo in "What's a hex value?"AnanasIn "What's a hex value?" it states that "So, in hex, nine is followed by A, B, C, D, E, and F (F corresponds to the number 16)." This is incorrect, as 0xF corresponds to 15, so 0x10 would correspond to 16.10Feb. 21, 2024
Lesson Q&A
Use this space for questions related to what you're learning. For any other type of support (website, learning platform, payments, etc...) please get in touch using the contact form.