Questions tagged [godot-4]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
76 views

My CharacterBody3D Is getting blocked by ramps that act as walls

To summarize, my ramp is acting like a wall even if it is created to have a collision and mesh that fits its shape. I have tried: Putting the max angle to 90 using different ramps (CSG & mesh) ...
3 votes
1 answer
31 views

Running a standalone Godot application on a Yocto 2.6 system with OpenGL3.0/ES2.0 hardware

I have an application that displays construction machines like excavators or snow groomers. The application is built on my company's custom engine, but I am trying to find out if I can port it to a ...
1 vote
0 answers
109 views

Multiplayer Seamless Open-World Chunks

there is a made a game called JDungeon that looks like this: I want to add seamless chunk loading and unloading, meaning instead of the black world boundary, a new chunk loads in seamlessly. I'm ...
0 votes
1 answer
127 views

How to drag and drop complex objects (with multilayered textures and text) in Godot?

Newbie to Godot here. My idea is to create a deck building game, inspired by Slay The Spire or Across the Obelisk. I have come to a problem that I can not seem to find the answer. So, the card object ...
4 votes
1 answer
11k views

How to wait until the frame is done?

According to Google, await ToSignal(GetTree(), "idle_frame"); should wait until the next frame. However, in Godot 4.0's current master branch (mono build!)...
0 votes
1 answer
53 views

Sort an array of Node3Ds by distance with closest first

I am working on kart racing game. I have created a series of respawn points (Node3Ds) for when a player falls off of the track. Currently, I am trying to get the closest respawn point to the player ...
0 votes
1 answer
459 views

How to check if a point is on the navmesh?

How do I know if a node is in within a navigation rectangle? I am working on an enemy spawner that puts enemies off screen but I need to pick positions where the enemies will actually work (read: on a ...
0 votes
1 answer
159 views

Collapse/uncollapse a Tree in Godot 4 by clicking on the TreeItem?

Is there a way to collapse/uncollapse a Tree (Control) in Godot 4 by clicking on the TreeItem instead of the folding arrow? I ...
1 vote
0 answers
73 views

Y-Sorting in 2D Isometric Games in Godot 4.x

I am having a problem with Y-sorting in an isometric Godot game. More specifically, when my character moves behind/in front of larger objects than one standard tile size, the rendering is inconsistent....
3 votes
1 answer
109 views

Checking if a node is of a given type in Godot 4

I want to check if the player is near a door. In practice, this means that I want to check if the Area2D of the player node overlaps a door node (an ...
1 vote
1 answer
37 views

Strange Marker2D behavior in Godot with barebones code

I'm new to programming in Godot but I've been playing around with things I've learned in various tutorials. That is, until I ran into the following issue which I can't seem to debug. I attached a ...
1 vote
1 answer
39 views

What is the purpose of Uv_clipping in godot?

Can anyone tell me what is the purpose of uv_clipping property of rendering section in tilemap in godot with example? I don't understand what's the use of this property
0 votes
0 answers
91 views

How to scale UI for different screen resolutions

Godot 4.2.1, not a pixel art game. This is about scaling the UI, not sprites etc. I am targeting 1080p (base resolution), 1440p, and 4K. 4K is easy, I just set the scale to 2. But for 1440p, if I set ...
0 votes
1 answer
149 views

Detect collisions with both parent and child nodes in Godot

Using Godot 4.2.1, I have a 3D scene with a CharacterBody3D as the root. It has two children; a child CollisionShape3D, and a child CharacterBody3D with its own collision shape. ...
0 votes
0 answers
30 views

Rotation inside MeshInstance3D surface plane

I'm trying to make a representation of a plane that rotates around a hole in a MeshInstance3D. So far I've managed to make the circle's hole, but I can't make the ...
0 votes
1 answer
655 views

CharacterBody3D gravity isn't working, and player won't touch the floor

I'm trying to create an isometric game with Diablo-like control, but gravity isn't working. The CharacterBody3D won't touch the floor, the print(is_on_floor()) always results false. Here's my code for ...
0 votes
0 answers
58 views

How to rotate Scene Collection TileSet

I am using a scene in a TileMap node, but I can't seem to be able to rotate it. I tried rotating it in code, but that doesn't work. I also tried rotating it in the editor using the TileMap node. Is it ...
3 votes
1 answer
203 views

Is there a way to instantiate a custom class decided at runtime in GDScript?

Can I instantiate a custom class during runtime through a String without knowing the value of the string when writing the code? Example: ...
11 votes
3 answers
6k views

How can I structure my game like a "classical" program?

How can I setup a Godot 4 project in the way of a "classical" software project? With a Main function. Openable in any IDE. Compiling to an executable file ...
1 vote
1 answer
456 views

Drag and Drop Godot 4: Disappears when dropped outside allowed area

I'm trying to make a simple drag and drop function, and it works when dragging from one area to another, but if I accidentally drop the sprite outside the allowed areas, it just disappears. I've been ...
1 vote
0 answers
49 views

How to share files between projects?

Ok so, I want to have a discreet client and server project. This project necessarily must have some of the same files so the server can do calculations/collisions/etc. Instead of having to copy files ...
0 votes
3 answers
1k views

How to get nested child node without using full path in Godot?

How to get nested child node without using full path? I tried with just node name, it doesn't work. The script is on top level so the path is quite long: ...
1 vote
1 answer
94 views

Why can't I get the AnimationTree node?

This is my code: ...
0 votes
1 answer
1k views

Draw a player in an isometric tilemap in the right order

I'm trying to create an isometric tilemap world in Godot 4 beta 4. The world is made of blocks on top of each other where for every Y level (thinking the world like if its in 3D coords) there is a ...
0 votes
1 answer
342 views

Why is this Godot extension class still considered abstract?

I'm working on building an extension to MultiplayerPeer for Godot, using GDExtension. As is my custom, even if I don't end up pushing it to the final product, I always start with a Nullary Pattern ...
-1 votes
1 answer
100 views

how can i make my jump animation and fall animation to work in godot 4.2? when i press jump it doesnt play the animation and when it fall, the same

this is the code im using ...
2 votes
1 answer
382 views

Hide Children of Node

I am making a addon for my friends, and I am trying to make a custom node. It works, but I have a problem, the children of the custom node is visible in the scene dock. The ...
2 votes
1 answer
118 views

Setting A Panel texture in GDScript

I am messing around with Godot, and I couldn't seem to find a way to set the texture of a Panel node in Godot. First I tried using the ...
0 votes
0 answers
70 views

Pixel platformer character collides with blocks above while there's still a visible gap

I was trying to the set up a tile map for a 2D pixel art game in Godot 4.1 (following a tutorial) and realized that there seems to be an issue or something I am not aware of with the way collisions ...
0 votes
0 answers
135 views

Using 3D Rotation track animations in the AnimationPlayer in Godot

Godot v4.1.2.stable My goal is to make DirectionalLight3D rotate 360° around the scene, and in a second animation change the angle of rotation every 180 rotations between 75° and 30° on the X axis (a ...
5 votes
1 answer
296 views

How to get consistent collision impulse values for colliding rigid bodies in Godot?

I'm writing a game where you can pick and throw objects and depending on the force of the impact they break. Using the get_contact_impulse method to calculate the breaking point gives me very ...
1 vote
2 answers
465 views

Simple Circuit System

I want to make a simple circuit system in Godot. Here's what I mean by that. (The circuit isn't realistic) I just want a battery object and a ...
1 vote
1 answer
287 views

Actual Custom Nodes in Godot

So I am creating a plugin for Godot 4, and I want to create an actual custom node. What do I mean by that? First to create a custom node I do: ...
0 votes
1 answer
110 views

"Springy legs" for a First Person Controller in Godot 4

I'm a total beginner, so I barely know what I'm doing, but here goes: I'm using this First Person Starter template and I would like to add a "springy legs" feature on character landing. The ...
0 votes
0 answers
186 views

Curves in Godot 4

I'm trying to figure out how to use curves to ease variable values in Godot 4. Ok, I've created a curve like this: @export var test_curve: Curve I set up my curve ...
2 votes
1 answer
93 views

How to make redirected player movement respond to same key?

I have a 2d game (Godot 4) with different rooms with portals to go between them, and some portals redirect the direction of the player while still holding the same key. I have that working so far, but ...
0 votes
1 answer
80 views

change_scene_to_file successfully transitions scene, then transports back to the previous scene

I'm having a problem with change_scene_to_file in Godot 4. For some reason after the scene transition succeeded, I was automatically transported back the previous ...
1 vote
1 answer
43 views

Prevent color adjustment in ViewportTexture

In Godot 4.1.1, I'm trying to use ViewportTextures to capture values generated by some shaders for use in another shader. One SubViewport is capturing the result of an unshaded spatial shader on a ...
1 vote
1 answer
233 views

How to use the godot::String % operator for string formating of multiple values?

I tried this: godot::String str = "values: %f,%f"; double a = 1.0; double b = 2.0; str = str % a % b; Result string is: ...
0 votes
1 answer
102 views

When I inherit my own GDExtension class, editor can no longer see the inheriting class

I had two classes in my game, Player and ShootableObject. Both set up as such: ...
3 votes
1 answer
115 views

How to make a CharacterBody2D slide out of StaticBody2D instead of teleporting?

I am trying to replicate Mario Maker's On/Off switches in Godot 4.1. In my current version, if the player got stuck inside the block after it was toggled on, the player just teleports out it. I know ...
2 votes
1 answer
180 views

Why does find_child not work during _ready, but looping over child nodes finds the child?

I have been trying to split a game object in half, starting with splitting the collision shape in half. I create two new clones of the split object, then give them a property to be assigned to the ...
0 votes
1 answer
702 views

How do I get the depth texture in an expression in Godot 4's visual shader?

I'm working on a tutorial for creating wake waves with Godot, versions 3.5 and, importantly, the upcoming 4.0. It uses shaders (including visual) and works fine so far, but in attempting to get the ...
2 votes
0 answers
226 views

How to make a callable type safe?

I can write a function like this: func foo(someCallableThatShouldReturnBool: Callable): if someCallableThatShouldReturnBool.call(): # do something ...
3 votes
1 answer
291 views

How to Y-Sort a multi-tile entity as a single tile?

I am trying to use Y-Sorting on a tilemap tree to Y-Sort the whole tree, but it is Y-Sorting each tile of the tree instead of the tree as a whole: I have tried adjusting the Y-Sort Origin but that ...
1 vote
1 answer
160 views

Raycast suspension simulation rebounds car on landing

I'm expecting the car to land and engage the suspension to dampen the landing. The code I'm using currently has this effect: ...
0 votes
1 answer
42 views

Move player at godot4

I designed a character that has 4 walking modes for godot4. I saved the picture in PNG format. I enter it into the animation section. When I set the keyframes and play, in addition to playing the ...
1 vote
1 answer
113 views

Scene Doesn't Change After Animation Complete

I'm encountering an issue in Godot 4 with my 2D character where the "Hurt" animation plays correctly when the character's health reaches 0, but the scene does not change as expected. Here's ...
1 vote
1 answer
89 views

Random display of a character in Godot 4

I made a character in Godot 4 that enters from one side of the image and exits from the other side, which shows its different modes randomly each time. I have written these codes for it: ...
0 votes
1 answer
136 views

How to code glider movement in 2D? (Godot 4)

So in Minecraft, you have the elytra. When you look up, the character moves up. When you look down, the character moves down. The speed you move forward depends on the angle you are moving. I want to ...