XIO

xWire

Posts from every feed QUEST has found across the web — blogs, news, podcasts, channels and more.

Godot Forum - Topics tagged godot-4

Topics tagged godot-4

Different references to objects apparently create different objects

Godot Version v4.7.2.stable.official Question I have a list of characters stored in two places. One, inside a state file which can be saved and loaded at will. Two, inside a temporary list of characters for use in a camping scene. I thought that these two different arrays should both be storing references to they same character objects in memory. However, through testing, I have determined that the objects are somehow being duplicated instead of referenced. I hope it’s not necessary to post my…

Multiplayer: Apply_impulse is only working on Host

Godot Version v4.6.stable.official Question I have a P2P multiplayer game where players can pick up and throw objects. So far, pick up is working fine for all players but throwing would only work properly with the host. Any clients would simply drop the item. Sometimes the item would spin, but I’m unsure if that is the apply_central_impulse. extends Area3D @onready var interaction_ctrl = $"." var interaction_component = RigidBody3D @onready var remote_transform_3d: RemoteTransform3D =…

Blender import - half the object is missing

Godot Version 4.2.2 version Question I am importing chess pieces - created in Blender - but half of the model is missing. This only happens with the knight, BTW. All other pieces import as expected. What could cause this ? I do have Blender so I can make adjustments to the models there and reimport, but in Blender it all looks fine, as shown in the attached combined image. 7 posts - 3 participants Read full topic

Occlusion Culling not culling objects behind sealed room (Objects/Draw Calls remain high)

Godot 4.7.2 Hi everyone, I’m currently struggling with Occlusion Culling in my Godot 4 project and could use some advice. I have fully enclosed a room with Occluder geometry (Walls, Floor, and Ceiling are all properly covered) The Occlusion Culling buffer (debug view) shows the interior correctly as white/free and the surrounding walls as gray/occluded Occlusion Culling is properly enabled in the project settings I have completely followed the official Godot Occlusion Culling Documentation, but…

Object no longer appears when script is attached to it

Godot Version Godot Mono 4.7 Question I have multiple PathFollow2D objects(with a Path2D parent) which, when I attach a script to them (to their scene that is) called PopEnemy, they never appear in-game. But if I don’t attach a script to them they move along the path as intended. Here’s the script I’m trying to attach to them - they inherit from BaseEnemy which is also below. Even if I comment out the collider.SetDeferred(“disabled”, false); and Hide(); in _Ready() in BaseEnemy they still never…

Godot Advanced Movement Template

GitLab Pasqui23 / GAMT · GitLab GitLab.com A project template for developing 3rd person games, featuring motion matching jumping hanging and shimmy around ledges extensible movement logic based on AnimationNodeStateMachine Remapable keys based on Smartinput addon Disclosure: I have used local LLM for writing some of the trickier code and the documentation 1 post - 1 participant Read full topic

Efficient Room Collision Shapes

Godot Version v4.7.1.stable.official [a13da4feb] Question Is there a cheaper way to make a collision shape for rectangular rooms with entrance hallways? So far I’ve been making each wall of the room a separate SegmentShape, but I’m sure there must be a better way to do this. 4 posts - 2 participants Read full topic

Godot 4 VFX packs by gennai (I add each new one in this thread)

Hi, I’m gennai. I make VFX packs for Godot 4 and sell them on itch. Most of them work on a mesh you already have, so the fire, frost or wound sits on your own character and stays on while it moves. They run on Forward+, Mobile and Compatibility, and most packs have a free version on the same page if you want to try one first. I’ll add each pack to this thread as its own post, with a clip and a bit about how I made the part I liked most. If you’d rather just look at everything, the full set is…

Dividing distance between vector2 with leftover

Godot Version 4.7.2 Question Hello, I’m experiencing a left over on distance dividing between two Vector2 coordinates. The purpose is have same length added 10 between steps, and the last step would have leftover if is less then divider. I made this minimalistic code to show what I mean: func divide_junctions_to_equal_parts() -> void: var divider : int = 10 var start : Vector2 = Vector2(450.0, 525.0) var stop : Vector2 = Vector2(450.0, 300.0) var direction = start.direction_to(stop) var…

Survivors Kit: a complete survivors-like template for Godot 4 (700 enemies in plain GDScript, web demo)

I’ve been building a survivors-like template for Godot 4 and it’s now out. You can play the demo in your browser first: Survivors Kit - Playable Demo by Spare Parts Studio How it handles the crowd Enemies aren’t nodes. They live in packed arrays, a spatial grid (rebuilt each frame with a counting sort) handles hit checks, and each enemy type is drawn with one MultiMeshInstance2D. The included performance test runs 700 enemies with six max-level weapons in about 3 ms per frame of game logic, in…

Can I use .append to add a Dictionary var to an existing Array?

Godot Version 4.7.2 Can I use .append to add a Dictionary var to an existing Array? Hi, I am really new to Godot and GDScript specifically so I decided to try and recreate Poker to start, how can I then access each single Dict inside of my array, to print all of the cards? When I then print using print(“deck”) it only shows 13 of Spades, but I figured that is just Godot reprinting only the last value of the array extends Node2D signal draw_card() #Array di dizionari var card: Dictionary =…

Capsule CharacterBody3d getting stuck in between two assets with convance collision

Godot Version 4.7.1 Question i am using concanve and convex collision on very simple geometry. but if the geometry is not perfectly lined up, or if i ever want a step the player gets completely stuck. ive tried poking at all the settings and follow some of the threads ive found here but still not luck. I am using move_slide Here is a shot of my character and its capsule. The character is about 1.5 meters tall. and ive done a few test with steps of different heights. i would expect that steps…

I want to change direction at a defined timing

Godot Version 4.5.1 Question Hi, first of all I’m a rookie regarding development. I’m trying to create a platformer 2D with momentum and i have a running state in physics process. My goal is to make the player change direction with momentum at a precise timing else he’ll go back to a walk state. I’m having issues on how to define the timing and take the input at said time. The thing is i get to change direction but not in a consistant way at all and it need the action to be spammed like hell.…

I need help for this code

it gives that error in item list 1. First Item Text: kılıç yüks (appears to be an abbreviation for sword upgrade/leveling) Icon: A file/folder icon assigned Selectable: On (checked) Disabled: Off (unchecked ) 2. Second Item Text: ekstra kal (appears to be an abbreviation for extra cal, extra caliber, or simila r) Icon: A file/folder icon assig ned Selectable: On (chec ked) Disabled: Off (unche cked) and here is code extends TileMapLayer # Called when the node enters the scene tree for the first…

Reasons Why Lights and Shadows Don't Look Good in Dark Scenes

Description I’m working on an image where I want to create an effect where a light illuminates the darkness, but I’m encountering the issue shown in the image. What I Want to Create An exploration game where the player explores a map while using a light to illuminate the darkness. Project Status I’ve placed corridors using GriMap. What I Want to Know I want to resolve issues 1 and 2 to create a clean, realistic effect for the darkness. Issues Light enters the interior of the corridors, so they…

Targeting an object in another scene

I have made a world scene that includes a model planetarium in which the model sun moves in synchronization with the DirectionalLight3D that is lighting the scene, using this simple script attached to the model sun: extends Node3D @export var target: Node3D func _process(delta): global_rotation=target.global_rotation This gives me a field in the Inspector that lets me assign a target for the model to synchronize its rotation value with. Now I want to make the whole model planetarium it’s own…

Godot always opens gdscripts in VSCodium (unwanted) and cannot open C# scripts in VSCodium at all

Godot Version v4.7.stable.mono.official [5b4e0cb0f] Question I have transitioned my desktop and all my godot development away from Windows 10 to Linux Mint 22.3 Cinnamon because Windows 11 was the last straw for me. It’s going well so far except that something has gone wrong with the connection to the external code editor. For some reason, no matter what I do, I cannot get any C# scripts to open from godot into my external editor which is VSCodium, and I cannot get my gdscripts to open in the…

Not sure why the autotiles look like this

Godot Version 4.8.beta1 Question This is my first time working with autotiles. I’m trying to have a power cable come up as my mining drone moves around. It should be just one continuous line, but it’s coming out like this: I have a TileMapLayer node dedicated to just these cables. My autotiles are set up like this: I don’t understand why the corner is showing up, when based on what I have painted, the corner shouldn’t connect with the horizontal tile. My tileset is set up as the following: 3…

I don't know how to create UI appear when the mouse cursor hovers over an object.

Godot Version v4.7.2 Question I want to create a UI that appears when the mouse cursor hovers over an object. When the cursor hovers over a ColorRect, I want a PanelContainer to appear, allowing the user to click the button inside it. However, the PanelContainer doesn’t appear with my current setup. I’m a godot & English biginner. extends ColorRect @export var text: String @onready var button: Button = $PanelContainer/MarginContainer/Button @onready var area_2d: Area2D = $"../Control/Area2D"…

Placing Mario esc coins in a level pretty slow

Godot Version 4.7.stable 3D project Question I have a collectable that is basically a coin, and I want to place it a lot around the levels I have, but dragging it in and duplicating it tons of times ends up becoming pretty annoying to deal with after a while. Is there a better way to do it? I know Godot has Tilemap but it has no support for 3D besides Gridmap which cant instance scenes /: 3 posts - 3 participants Read full topic

Rays_FindIntersection method fails for unclear reason

Godot Version v4.7.2.stable.mono.official [ed1daf0bf] Question I’ve made a method to find the intersection of two rays if it exists, however it isn’t working for some point-angle sets I give it. The method itself is this: public static Godot.Vector2 Rays_FindIntersection(Godot.Vector2[] points, float[] angles) { Godot.Vector2[] angle_vectors = [ Godot.Vector2.FromAngle(angles[0]), Godot.Vector2.FromAngle(angles[1]) ]; //rationale for using 2,048 //https://…

Both functions are being called even though it should only be one

Godot Version 4.7 Question I have code to throw ravens, and currently I have two ravens to summon already placed in below my map. When you call the throw function, it moves one of the ravens over to the RavenSpawnPoint and then it starts moving. Which one it throws should be decided by the CurrentRavens integer. The problem is, when CurrentRavens == 2 it throws both of them rather than just one, then when I press it again it only fires Raven1 as it should, but that means it isn’t running the…

Can i edit an AnimationBlendTree resource without an AnimationTree node?

Godot Version 4.7 Question If i click on an AnimationTree node that has an AnimationNodeBlentTree resource as root, the animation tree editor shows up on the lower dock: If i select an equivalent AnimationNodeBlendTree resource on a custom node, the editor does not show up: I want to stash away many “template” blend trees that will be procedurally added, removed and rewired on a final AnimationTree node. I could just have one child tree per custom node and edit the template blend trees there,…

Need help with working on a pause screen

Godot Version 4.7.2 Question I’m working on a pause screen for my game, and have managed to get it to toggle on and off with the escape key. However, the tutorial I followed did not include instructions on how to use the mouse, and since the pause screen is a canvas overlay, I have concluded that the player’s camera code is causing the mouse to be stuck in the middle of the screen. The code for said camera is in a script attached to my player, but I don’t know how I could stop the mouse from…

Auto-Connect Different Tilemaps

Godot Version 4.7 Stable Question In my game, I have two different TileMapLayers. What I want to do is make the orange one connect to the grey layer automatically, as doing it manually will be too tedious. Autotiling: What I want to achieve: How can I make this automatic? Note, I don’t want the grey tiles to change, just the orange. 4 posts - 3 participants Read full topic

Z index doesnt work

Godot Version 4.7 Question in 2D the option z as relative doesnt do anything ? All of a sudden this solution shows up has a way to fix things on a google search. If i have a character made of 15 bodyParts, where the left arm and left leg need to be behind the others parts, by using z index -12 this part will show up behind the background, even if the z index of the parent is 0. The only way is to change the nodes order in the tree which is a total mess, ( garbage hidden under the carpet ) Why…

Things that exit 0 in Godot 4 headless even though they failed (measured, reproducible)

If you run Godot headless in CI, or let an AI agent “verify” a change, it usually runs the engine, sees exit code 0, and calls it a pass. In Godot 4 that proves very little. I measured these on 4.7.2, Windows and Linux. Every one exits 0: --import on a project with a hard syntax error: no output at all a scene whose own script doesn’t parse: SCRIPT ERROR, then the scene runs as a bare node a test harness that forgot to await a slow check: prints PASS, and the failing check never prints running…