2,408 questions
Tooling
0
votes
0
replies
21
views
Go server and godot P2P connection with out port forwarding
This days me and my friend made a multiplayer game in godot. The server is written in go using protobaf. To test the multiplayer, i used ngrok. I know we can use port forwarding but i thought ngrok is ...
0
votes
1
answer
34
views
Godot Mono with Facepunches Steamworks implementation throws shared object file error
I am using Godot Mono 4.5.1 stable, and am trying to get Facepunch.Steamworks working. I specifically run into this error:
E 0:00:02:363 Steamworks.SteamAPIInitResult
...
/usr/lib/dotnet/shared/...
2
votes
1
answer
75
views
What is the value of VIEW vector in a spatial shader's fragment processor function?
Accorting to the Godot Doc's description about the build-in variable VIEW in fragment processor function:
Normalized vector from fragment position to camera (in view space). This is the same for both ...
0
votes
1
answer
242
views
How to fix "Invalid access to property or key" (Gdscript 4.5.1)
Trying to write the camera movement for a 3d character, it's my first project. Just a basic psx shooter. so i wanted to make the camera followed along with the cursor.
I can't seem to fix the error ...
Best practices
1
vote
1
replies
49
views
How do I detect collision with control node in Godot?
my card scene tree
I want to make a card game where player can stack cards on top of each other (like Solitaire or Stacklands). I have a control node as the root node and Sprite2D as the child node. ...
Best practices
1
vote
1
replies
71
views
Exporting a pair of values as a minimum/maximum
I'm writing a script in GDScript; I'd like to export a pair of values, e.g min_height and max_height. Obviously, I want min_height <= max_height.
Is there a way to enforce that relationship in the ...
0
votes
0
answers
74
views
Godot not printing to output console. Fresh install of godot 4.5x
In godot, I couldn't print to output panel. Everything seems to be okay, I made a root node called Main and attached main.gd script with
extends Node
const packets := preload("res://packets.gd&...
1
vote
0
answers
54
views
Why doesn't my GD script with autoloads post its variables?
When I use (Morton.morton_statetest) in another script, It gives me 0, and even if I put a print in Morton script and If I put an print in the other script, it gives me two values different, wit out ...
1
vote
1
answer
70
views
How to reset sequence playback index in Godot AudioStreamRandomizer
I am using an AudioStreamRandomizer with playback mode = Sequential to play a few dozen sound files. When I play the audio stream, I get the next sound in the sequence, but the starting index is ...
0
votes
0
answers
50
views
Rendering issue with procedural world generation in Godot 4
I have a really weird issue with rendering chunks in my Godot 4 (4.3.1) world generation implementation, when zooming really close, some chunks start to disappear (but they are still 100% loaded, ...
0
votes
1
answer
105
views
How do I add more enemies in my Godot project?
I'm working on my school project about my first top down shooting game. Anyway after I did my project by following a tutorial from youtube I desire to add more enemies. But I've no idea how to do it?
...
1
vote
0
answers
64
views
System.AccessViolationException occurs when running a C# Godot unit test for Node2D object
I am building a card game using Godot 4.5, with C#. I am trying to unit test a Card object that inherits from Node2D, but when I attempt to run the test, I get the following exception:
Exception has ...
0
votes
0
answers
70
views
RenderingServer cannot access global shader params
in Godot 4.4.1 I'm trying to access shader variables in code to do some math for my game. However, Even though I have set these shader parameters in global/shaders in project settings they don't show....
0
votes
1
answer
117
views
Input from combined 2D and Control nodes
In Godot 4.5, I have an Area2D with a CollisionPolygon2D to make a complex-ish shape on screen clickable, and also update mouse pointer when entered/exited (arrow to hand and vice versa). This works ...
0
votes
0
answers
50
views
Godot apksigner error - all 'apksigner' tools failed to execute
When exporting the project to Godot 4.2.2 for Android, I encountered the error: [Code signing] All 'apksigner' tools located in the Android SDK 'build-tools' directory failed to execute. Please check ...
1
vote
0
answers
67
views
Jittery movement in tilebased Pokemon-like movement system
I tried creating a tilebased movement system in Godot similar Pokemon, however I get jittery effects after a while of moving around
Here is my Player Script handling inputs and state transitions:
...
1
vote
0
answers
83
views
Type hint for a class type in Godot / GD Script
I'm trying to check if an object adheres to certain restrictions by checking its type against a given check_type variable. This variable is set dynamically, so I cannot check against a fixed class ...
0
votes
1
answer
94
views
Query Firestore from Godot
I am trying to link my Firebase and Godot for my current project. I want to have a system for finding friends and adding them to your friends list. I have the usernames saved on Firebase, and now I ...
1
vote
1
answer
118
views
How can I optimize my C# code for capturing a window to use as a texture in Godot?
Cobbling together code from various sources online I was able to create the following function that allows me to capture an image of a window on my desktop (Using Windows 11). I'm attempting to use ...
0
votes
0
answers
56
views
Godot .tscn Scene Hierarchy Not Displaying Correctly in Editor
I am having trouble with my Godot .tscn scene files: all nodes are showing up flat at the root in the editor, and the hierarchy isn't being recognized. I noticed that even though I am using the parent ...
0
votes
0
answers
94
views
GODOT Pixel font has extra pixel of spacing
I am making a pixel mobile game, and using a 3x5 pixel font. But Godot is adding a pixel of spacing around and I cant figure out why. Is this something to do with the font, or is there a Godot setting ...
0
votes
1
answer
44
views
Error when loading FBX file in EditorImportPlugin - how to load fbx files?
I am trying to create an EditorPlugin/EditorImportPlugin to import fbx files. More specifically I want to extract the animations from the files and save them as a .res file.
Normally I go over the ...
1
vote
2
answers
72
views
Issues with sequential cooldown
I've been attempting to make a system in which you can use an ability with 3 charges. Once you use one, Only that one will recharge, When you use another, The recharge progress from the first will go ...
0
votes
1
answer
133
views
How do I assign properties to tiles using TileMapLayer?
I’m working on a top-down rpg.
Basically all I need to know is how to write scripts for specific tiles or tilesets. I know that by simply "painting" the physics layer on a tile, I can make ...
0
votes
1
answer
89
views
Issue when rotating around multiple axes
I am trying to replicate how the Hadamard gate works. I have a system consisting of a sphere with a cylinder attached, and I would like to rotate the whole system by 90 degrees around X and then by ...
0
votes
0
answers
76
views
Godot: “Attempt to call function 'start_shake' in base 'null instance'” when accessing CanvasLayer node in scene instance
I’m having a problem in Godot 4 with calling the start_shake function in my screen shake system.
In the scene 1_level.tscn, I have SceneRoot with a child node Map, which is an instance of Map.tscn.
I ...
1
vote
1
answer
116
views
Why does comparing array.size() with a const return an Object, not a bool?
So I’m running into an issue while implementing an ‘undo’ mechanic in Godot Engine v4.4.1 using GDScript. I’m trying to limit the size of the undo queue, and cut off the end once it exceeds the limit.
...
0
votes
1
answer
49
views
My inventory is malfunctioning (in Godot)
I've been programming an inventory system. When I created the function to drag objects from one slot to another, I've been stuck even after some research. At first, objects are dragged, but the ...
0
votes
1
answer
62
views
Godot inherited scene does not have script variables in editor
I'm new to Godot so I'm sure I did something wrong but I can't figure out what it could be. I created a scene "piece" and then I created 8 scenes which all inherit from piece. These are ...
0
votes
1
answer
97
views
How am I supposed to be managing instances so that I don't affect old instances of the same scene
What is supposed to happen:
5 blocks should be created above the screen and scroll down the screen at a the same speed.
Every 5 seconds, a new set should be loaded in the same place that the original ...
2
votes
1
answer
145
views
Instancing in Godot
How big is the difference between instancing a scene with c# compared to GDScript? I noticed on the docs that it does say that when instancing a scene "Preloading the scene can improve the user's ...
0
votes
3
answers
120
views
Dynamically update CollisionPolygon2D at runtime? [closed]
I have a stacked area chart like the supplied image (but often slightly more complex).
Each polygon doesn't have all too many points and renders efficiently.
This chart often updates with a tween ...
1
vote
1
answer
49
views
Trouble detecting whether a line segment intersects a ray
I'm following this guide to determine whether a line segment intersects a ray. My code, adapted from the python solution on that page, looks like this:
func do_lines_intersect(line: Array[Vector2], ...
1
vote
2
answers
109
views
Flashlight Turn OFF
There is a code of Flashlight with Battery in Godot 3D that turns ON when you press Left Mouse Button, but turns OFF the moment you release the button.
How do I make it turn OFF, ONLY after pressing ...
0
votes
0
answers
62
views
'Nephew' node null in 'Uncle' node's export variable despite being assigned in inspector
My Player scene has a StateMachine node governing its behavior, with Idle, Move, Fall nodes as children under StateMachine. Another node, FallDownPit, listens for a signal telling it the player has ...
0
votes
0
answers
80
views
Cannot create closed collision polygon dynamically
I'm having trouble creating the collision polygon for my curved lines. I'm creating it dynamically and its shape is not closed for some reason.
In my scene I have a Line2D, a Path2D, and I create a ...
1
vote
1
answer
101
views
Godot 4.4.1 C# Error 'no suitable method found to override'
In Godot, I get the error 'no suitable method found to override' for the default _Ready() function.
using Godot;
using System;
public class Box
{
public enum BoxType
{
//HURT_BOX,
...
0
votes
1
answer
202
views
High level multiplayer not working in Godot 4.4.1
I can't make the multiplayer work correctly, either when I enter the game with the client the client player despawn almost instantly, in both the host session and the client session and I get this ...
0
votes
2
answers
79
views
When I use pick_random on my array, how can I prevent picking the same element twice?
I'm working in something on godot engine 4. I create code to spawn objects in different parts of the screen. But I try to prevent to generate items in the same coordinates twice.
How I can do it?
...
0
votes
1
answer
96
views
How to connect to a Timer timeout signal on Godot engine with Lua GDExtension
Here is a simple script attached to a Node2D that i try to connect a timer timeout without success:
local test = {
extends = Node2D,
}
function test:_ready()
function ...
0
votes
0
answers
80
views
GitHub Actions unexpected parse error when running Godot workflow
I am building a workflow using GitHub actions to automate test runs for my current Godot project. I have written two independent actions and one workflow which references them. Of these two actions - ...
0
votes
0
answers
69
views
Godot Android Plugin: Engine.has_singleton(_plugin_name) returns false
I'm trying to build an Android App using Godot. Since I need a specific Android Library I tried creating a Godot Android Plugin following the official template.
For the library I had to update the ...
0
votes
1
answer
56
views
How do i get a characterbody3d to change their node path to another characterbody3d?
I am making a 3d multi-player horror game. My monster(characterbody3d) is using pathfinding to go to a certain area in the map. It does this by having an exported variable.
@export var player_path: ...
0
votes
1
answer
203
views
Godot Engine - How to prevent z-fighting
As a beginner in Godot Engine, my first project to practice is to create a skin editor for the game Minecraft. I created a grid as a MeshInstance3D for each cube (body part) but the render looks ugly. ...
1
vote
1
answer
56
views
Is there a problem with calculating triangle area using two vectors instead of three points?
I looked up calculating the area of triangle given three vertices.
func calculate_area_of_triangle(a: Vector2, b: Vector2, c: Vector2) -> float:
return abs((a.x * (b.y - c.y) + b.x * (c.y - a.y)...
0
votes
1
answer
56
views
I have 2d islands procedural generation on Godot. How can I check if a point is on surface?
By 'point', I mean a RefCounted, with these properties:
var pos: Vector2i
var is_surface: bool
var is_bottom: bool
And by 'surface', I meand a point, that doesn't have another point above it.
The ...
0
votes
1
answer
88
views
How to make player lose only one life when hitting many spikes at once?
I have been working on a project in Godot 4.4.1 (a 2D platformer) and have added some spikes for the player to jump on; if you touch a spike, you lose a life.
The problem is that if there are two ...
0
votes
2
answers
270
views
Handle Control losing focus between button press and release events
I'm making a small game with Godot, and the player can keep some panels on top of the game display while playing, for easy access to some actions.
The panel is a Control node, and it could appear on ...
0
votes
1
answer
117
views
Can't connect to MariaDB in godot
I'm trying to connect to my local database on godot, and the _connect_to_dv_srvr() function does not return any errors. But once I try to create a connection instance, it returns null!
var db_general: ...
0
votes
1
answer
93
views
Why is the position of a CollisionShape2D changing after it should no longer be accessible?
I have the following gdscript code on a script for cursor:
extends Node2D
# @onready var parent = $".";
@export var lineTemplate: PackedScene = preload("res://scenes/Gameplay/linemaker/...