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.
Accidentely forgot to remove @tool after testing the warning stuff in bullet.gd & now the editor auto close itself even on a restart◆ LPIt probably happened because I removed the code for Engine.is_editor_hint() condition.
I know I can change the script outside the Godot to fix this but I still find it a little amusing. The bullet moves & then closes the editor after reaching it's destination.10Dec. 17, 2024
Radians vs DegreesPaulI'm having a bit of a tangle getting my head around Radians. I understand how they are different to degrees, but my brain hasn't got used to calculating/visualising them.
For instance, in final challenge, I did:
```gdscript
##A value of 0 is perfect accuracy. Higher values increase spread.
@export_range(0, 20) var weapon_spread := 5
func shoot() -> void:
...
var spread_modifier := randf_range(0 - weapon_spread, weapon_spread)
bullet.global_rotation_degrees = global_rotation_degrees + spread_modifier
```
This makes sense in my brain, and it works here. I know it's going to add a few degrees either side to the angle of the shot. But I fear 'cheating' with the `rotation_degrees` property now might cause me some problems in the future? Should I try to stick with radians or is there a time and place to use either.40Dec. 05, 2024
Why do you add @tool in the Code Reference?MuryanIt feels like it’s unnecessary.
Without @tool, it seems the entire code still works fine.10Nov. 24, 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.