Is it good way to instantiate Player Node in root?
So say i have two scenes “Main” and “Second” both should contain player. Now i spawning player in scenes like
How to make virtuak keyboard to show all the time in Godot 4
in godot 4 i am making UI game. Each scene is loaded with a lot of LineEdits and user needs to type letters there. however whenever i exported the game and tested it on mobile device i saw that whenever user is done with for example line edit 1 and switches focus on line edit 2 to modify it, keyboard closes and opens again. because there is hundreds of line edits in the scene constant closing and opening of keyboard becomes really annoying. is there way to keep the keyboard open all the time?
Label not updating when needing it too
**extends Area2D var playerHasTouched = false var canReload = false var hasShot = false var reloaded = false static var bulletCount = 10 @export var bullet_count : Label func _input(event): if Input.is_action_just_pressed(“Shoot”) and canReload == false and hasShot == false: bulletCount -= 1 hasShot = true await get_tree().create_timer(0.5).timeout hasShot = false bullet_count.text = “BULLET COUNT: […]
problem getting the position of the parent node in godot 4 gdscript
I am trying to get the position of the parent object but instead of returning its real value (0,80) in this case, it returns (0,0)
This is the code for getting the position:
How to update Node2D gizmo on changing position in editor?
I have a simple script which updates the position of the child node in tool mode
How to implement a mouse click to select a characterbody2d out of various other characterbodies in the scene and move it with mouse click
I am creating a scene with four player, I want to be able to select each by touching them or clicking on them and then pointing at another location to move only that player out of four other players in the scene. How can I Implement this
Attempt to call function “is stopped” in base “null instance” on a null instance in Godot
I’m really unsure why I’d be getting this error. BulletCooldownNode is a timer object in Godot, it’s a child of the script. It started this ever since I made the script global. ANy ideas?
godot4. how i get a func that returns how many elements of an array are equals in separated arrays
How i get a func that returns how many elements of an array are equals in separated arrays
with gdscript in godot 4
Dynamically update NavigationRegion3D
I am moving a CharacterBody3D
with a NavigationAgend3D
. If i block off the path completely (i.e. with a big enough StaticBody3D
) my CharacterBody3D
walks up to that obstacle and stops. Now i want the StaticBody3D
to resume it’s way to the target location once that obstacle has been removed. However, if i remove the StaticBody3D
and its parent (MeshInstance3D
) and then call bake_navigation_mesh
the area does not seem to be updated.
How do i get the lowercase version of a key of InputEventKey in Godot?
I am making a typing game in Godot v4. I used this code from youtube, but the print statement prints out the uppercase version of the key despite not having caps lock on or pressing shift. is this normal godot behavior? How do i get the lowercase version when i’m not pressing shift/dont have caps lock on?