W 0:00:00:989 GDScript::reload: The local variable āstand_heightā is shadowing an already-declared variable at line 20 in the current class.
SHADOWED_VARIABLE
Player.gd:24 @ GDScript::reload()
Itās not an error. Itās a debugger breakpoint you probably accidentally set. Is there a red dot left of the line number on line 24? Click on it again to deactivate the breakpoint.
Yeah, Im clicking on the red dot. Its looks like arrow after clicking on the red dot, then Iāve played it and this showed up. I havenāt changed anything.
E 0:00:01:736 _ready: Invalid access to property or key āheightā on a base object of type āBoxShape3Dā.
Player.gd:24 @ _ready()
Player.gd:24 @ _ready()
Shapes are not same. BoxShape3D doesnāt have the height property while CapulseShape3D has it. Hence your error. You should follow the tutorial as closely as possible to avoid such gotchas.
Ivee changed it to CapsuleShape3D and played it. Suddenly the camera rotates itself.
Notices Iāve only move my mouse; when I moved Up is right rotates and down is left rotates.
WASD isnāt moving. I did set up all input in project setting.
Iāve notice Nagi on Youtube skipped some and Iāve found the problem, he didnāt come back to fix the rotation for up and down or left and right. Iāve copied and pasted it on my Godot 4.5 stable.
# --- WASD movement ---
var direction = Vector3.ZERO
if Input.is_action_pressed("left"):
direction -= transform.basis.z
if Input.is_action_pressed("right"):
direction += transform.basis.z
if Input.is_action_pressed("backward"):
direction -= transform.basis.x
if Input.is_action_pressed("forward"):
direction += transform.basis.x
Finally, finally its works! Thanks to AI ChatGPT for pointing this out.