Questions tagged [godot4]

for questions regarding usage of the Godot game engine, specifically version 4.0+

Recently, the Godot Game Engine released version 4.0. This major release brought many changes to how things are done in the engine including removing and adding various configuration options, as well as changes to their scripting language, GDScript.

Because version 3.5 is still in use, this tag allows users to specify that their question is about using version 4.0.

130 questions
0
votes
1 answer

In Godot shader how to use `hint` with a default value?

In this documentation: https://docs.godotengine.org/en/stable/tutorials/shaders/shader_reference/shading_language.html#uniforms I see several examples of how to use hint but I don't know how to set a default value when I use a hint I have…
fguillen
  • 36,125
  • 23
  • 149
  • 210
0
votes
0 answers

How to interact with Tilemap Editor by tool script / editor plugin?

Hello Godot's community ! Since Godot 4, the tilemap editor is on bottom pane that can be confused with Tileset editor and harder to use for non-dev users. So I tried to write an Editor Plugin in a Dock where there are only the images of base tiles…
macrico
  • 13
  • 5
0
votes
0 answers

how can i register vr controller input in godot 4?

I'm making a vr game in Godot 4.1, but I've hit a wall pretty early on. I can barely find any resources on how to get vr input at all, and none of that is for Godot 4. all I need is how to get input from the controllers.
R Baker
  • 21
  • 4
0
votes
1 answer

Godot 4 "Can't call non-static function 'aquire' in script." when trying to do "abstraction"

For a metroidvania game, I'm trying to make a powerup system that accepts a script with specific functions to call when something happens. The base class ('powerup_class.gd') is just this: extends Node class_name Powerup var player func aquire(): …
0
votes
1 answer

Godot ios export warning in Xcode: 'uilaunchimages' has been deprecated, use launch storyboards instead

I am using Godot 4.1.stable and Xcode 14.3.1 and when I build my exported project in Xcode I see this warning: 'uilaunchimages' has been deprecated, use launch storyboards instead. How can I remove it? I see an old solution for Xcode 11, I would…
fguillen
  • 36,125
  • 23
  • 149
  • 210
0
votes
0 answers

How to create ViewPager (UIScrollView) like control in Godot?

I have a page where I want to list out all the levels, say from 1-1000. Each level will be a button with number as text. It's not possible to list them all on a single page. I want to do 20 per page. Is there a way to add horizontal scroll that…
user1865027
  • 3,505
  • 6
  • 33
  • 71
0
votes
1 answer

How to move an object through the scene tree in Godot?

I created an Area2D node and created an AnimatedSprite node in it. I select a random sprite and create it with the Add_child function, I scroll with the script, but the scrollable background appears in the foreground and closes the "player" tried to…
SY DIE
  • 1
0
votes
0 answers

In godot, is there a way to automatically set a position of a camera such that a specific object stays at maximum size, pillar/letterboxing the rest?

I am trying to make a 2.5D Tower Defense game in 3D using Godot. My problem is that when I fix the camera to keep the map at maximum size, and then use another aspect ratio, it doesn't resize and pillar/letterbox the rest. Is there any way to do…
0
votes
2 answers

Godot 4.1 global_position is offset. Why?

If i use the player position to position the laser I get the laser in the origin of the player like I want it to be. Unfortunately I need the players global_position for positioning the laser. But everytime I try this it gets offset to the right and…
04M04
  • 3
  • 3
0
votes
1 answer

Attempt to update Line2D loop detector to 4.0, I am met with issues

Quick explanation: This script was previously made by Theraot who graciously created this script for me a few years a go, Today I attempted to update it and improve it! it work-ish apart from these weird issues I am met with. Issue 1: A issue I had…
Dragon20C
  • 307
  • 2
  • 11
0
votes
0 answers

Why can a falling RigidBody2D push a CharacterBody2D into a StaticBody2D?

Let's say there is a (simplified) scene, where there is a StaticBody2D (the ground), above it there is a CharacterBody2D, and above that, there is a RigidBody2D. Each one of them has a CollisionShape2D with a RectangleShape2D. The setup with visible…
ysylya
  • 3
  • 2
0
votes
0 answers

How to Create Area2D's with Collisions shapes of a set size and shape on demand, through code. Godot 4.1

I am creating a basic little fighting game test build, however, I am recreating this from my previous work in Unity so I am mostly trying to do the same thing here but with no success. The biggest hiccup right now is that I want to create and remove…
0
votes
0 answers

Godot Jumping problem for CharacterBody2d

There is this error on my gdscript code for CharacterBody2D that is supposed to jump and fall. The error says this: Line 13:Unexpected "Identifier" in class body. `extends CharacterBody2D @export var jump_impulse = 20 func…
Fluzzy
  • 1
0
votes
0 answers

What code should be written for the joystick?

Joystick code (working): @tool extends TouchScreenButton @export_range(0.0,1.0) var inner_opacity : float = 0.9 @export_range(0.0,1.0) var outer_opacity : float = 0.5 var direction : Vector2 = Vector2(0,0) var strength : float = 0.0 var…
0
votes
1 answer

Function for checking if node was not clipped from scroll container?

I'm trying this in Godot 4: # A helper for making a scroll container in a tab bar # follow the selected tab button. class_name PS3TabBarScrollFollow static func apply(tab_bar: PS3TabBar, container: ScrollContainer) -> void: …
Hydroper
  • 344
  • 2
  • 9
1 2 3
8 9