Relative Content

Tag Archive for godotgdscriptgodot4

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: […]

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?