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

Advice for adding 3D objects to 2D menu

Godot Version 4.6.3 Question Hi, I need some advice on how to change this menu I got from a tutorial into one that stays 2D but uses 3D objects in sub viewports, I also want the selected object to be able to be rotated with the mouse but that’s an extra thing. i have screenshots of the current layout along with the code extends Control @export var radius_x: float = 420.0 @export var radius_y: float = 120.0 @export var center_offset: Vector2 = Vector2(0, 0) @export var front_scale: float = 1.35…

I can't figure out how to make my character do a combo

Godot4.7 I don’t know how to do a combo attack. I’ve been trying to add a combo system to my top down perspective game for over a week now and I’m at my wits end. Every guide or forum post that I’ve found only seem to edge me to a solution that i cant reach and it’s driving me mad. I’d really appreciate some help here, I tried to trim down the code into only the relevant portions. This is an extended script based on an earlier instance of the player character if that helps, though the earlier…

Trying to get rid of root's world 3d

Godot Version 4.x Question I’d like to free get_tree().root.world_3d. But even in a new, empty project, it has two references. So I can only unreference the one in root. Where is the other reference? get_tree().root.world_3d.get_reference_count() # returns 2 get_tree().root.world_3d.unreference() # returns false There is no particular reason, I just don’t need it. 16 posts - 4 participants Read full topic

CharacterBody3D delayed collision with another CharacterBody3D

Godot Version 4.7.2 Question I’m trying to basically simulate two solar systems moving towards each other, crashing, then moving away from each other in 3D. So the planets in each solar system are in circular orbits around the sun of the system. The suns in either system are moving towards each other in a straight line. Planets that hit the suns should not affect their motion, but when planets collide with suns or planets, they should change their direction of motion (so if they were moving…

Binding player nodes and sprite to mouse

Version: Godot_v4.7.2 Hello! I should start by saying I’m an absolute beginner to Godot, as well as programming in general. I’m hoping to gradually teach myself just by searching for stuff online, but I’ve hit my first roadblock. In the game I’m trying to make, I want to have a player scene attached to the cursor and following it seamlessly. This is, I’m assuming, not the most practical way to achieve what I want in the longterm, but I’d like to figure it out as a learning opportunity as well.…

Best practices for swapping between multiple SpriteFrames resources

Godot Version v4.7.2.stable.mono.official Question Not new to programming/game design, but new to Godot. As part of learning it, I’m playing around trying to build various things to learn how things work, at the moment trying to build something like a top-down shooter where the player can collect different powerups that leave most of the player’s behavior the same but change the attack/animations they use. One option is to have all the data relevant to powers as a static or defined-on-load…

A weird halo arround camera view when near the ground

Godot Version 4.7.3 Question Hello ! I have some issue solving this problem, there is a low def halo arround my camera when i'm near the ground that appear, it also appear when near an elevation. The halo disapear if i deactivate mipmap, so i'm thinking it have something to do with that. I will try to modify mipmap options and hopefully find a fix but would be happy to know what actually cause this issue. Thank you very much Shader have elevation, is multiple blended textures with normal maps.…

Voxel terrain generation help

Godot Version 4.6.1 Question So around a week ago I watched and followed a whole series about voxel terrain generation and was wondering if I could generate caves. so I tried to do a naive approach and just wing it and I now have an error when trying to run the game and either undo but that means no cave terrain which I cannot have. the problem lies here: func generate_data(chunk_size: int, max_height: int, noise: NoiseTexture3D, color_array: Array[Color]) -> void: for x in range(chunk_size):…

Error: Cannot call method 'start' on a null value

Godot Version 4.6.3.stable Question Trying to add a cooldown to changing the gravity. Whenever change_gravity() is run it causes the error; Cannot call method ‘start’ on a null value. I know that g_cooldown_timer’s value is ‘null’ but I’m not exactly sure what that means aside from that it has no value. I have checked other similar questions, but while they may have had the solution to my problem I --quite honestly-- was not able to apply them to my own code. I have given the Scene Tree and the…

How do I fix this unknown error

Version godot 4. Question how do I fix these errors. Line 21:Expected “:” after “if” condition. Line 21:Expected statement, found “Dedent” instead. Line 21:Missing unindent at the end of function declaration. My code is. if Input.is_action_just_pressed("flammas spear") and func \_on_hurty_hurter_flamma_area_entered(): var sparta_hp = 0 pass The line the error references is line 21 which is 7 lines past this code this is also the only code in this script. 2 posts - 2 participants Read full topic

im new to programming as a whole, and i need to know how to fix this

Godot Version Godot 4.6.1 Question so, my code is: extends CharacterBody2D const SPEED = 300.0 const JUMP_VELOCITY = -400.0 func _physics_process(delta: float) -> void: # Add the gravity. if not is_on_floor(): velocity += get_gravity() * delta # Handle jump. if Input.is_action_just_pressed("ui_accept") and is_on_floor(): velocity.y = JUMP_VELOCITY # Get the input direction and handle the movement/deceleration. # As good practice, you should replace UI actions with custom gameplay actions. var…

Release: Timberwild, a tree-chopping incremental on Android (Godot 4.7)

Hi all, I’m Mike from This Way Games. Our game Timberwild is out on Google Play, and it’s made with Godot 4.7.2. How it plays: Each run gives you a grove of trees and a fixed amount of stamina. Every chop is a tap, so it’s active, not idle. Logs go to your sawmill and come out as coins. Coins buy nine stats: chop damage, stamina, crit chance, logs per tree, log price, regrowth, queue size, sell speed and delivery. Quests pay tokens for powerups (Meteor, Gold Rush, Berserker), lightning strikes,…

Control Nodes Neighbor Keyboard Navigation

Godot Version 4.7 Question My girlfriend and I have been making a 2D game since late July, and I’m working a lot on the UI right now, to make everything be navigated by a keyboard and a console controller. By just looking at all the Control node properties and docs, I have discovered today that there is a way to link the neighbors in all directions, so you can have an easy keyboard navigation, and I loved that! And overall, it’s working quite well. But there is a big visual problem: for…

Need Help with my Balls

Godot Version 4.7.2 Question I'm trying to recreate those ball battle videos on youtube, i.e. Earclacks, Ham's Ball Battles, etc. Whenever my balls collide, they sometimes stick together and bug out before finally having a proper collision. How do I ensure that they bounce around properly, and collide with one another only once? Here's my physics process: public override void _PhysicsProcess(double delta) { if (dead) return; Vector2 velocity = Velocity; // Add the gravity. if (!IsOnFloor()) {…

Vector2/Vector3 deviation after initialization

Godot Version Godot Engine v4.6.2.stable.official [71f334935] Question I noticed something strange while programming with Vector2 and Vector3: # Example: var vec: Vector2 = Vector2(5.25, 4.69) print(vec) # Output: (5.25, 4.69) # However: print(vec.x) # Output: 5.25 print(vec.y) # Output: 4.69000005722046 This caused some bugs in my game. Especially when I compare the x-values of two vectors and the condition is sometimes true and sometimes false. Depending on weather the x-value is actually…

I'm working on my first game, I what do you think?

Godot Version 4.7.2 My first game! (and saying hi) I’m working on creating this game called Untitled Pirate RPG; if that name is taken or too similar to something, please lmk. This is the starting island so far, and some basic gameplay. If you have any comments or would like to help in any way (especially with 3D models and audio), I would really appreciate it. Since this is my first game (and I plan to finish it), I’m still a beginner, so any skill level is welcome, and I would love different…

Mako UI - Game UI in HTML, CSS & JavaScript for Godot 4

Hi everyone, I’ve been working on Mako UI: you write your game’s UI in HTML, CSS and JavaScript, and the engine renders it natively as a draw command list. The Godot version is a GDExtension for Godot 4.7, and it’s still alpha, so take this as an early look rather than a launch: Mako UI for Godot 4 | Game UI in HTML, CSS & JavaScript (Trailer) In the video, The demo runs inside the Godot editor with a Mako UI HUD. A few full-screen shots come from my demos in other engines, because the same…

Button Node not receiving inputs

Godot Version 4.6.3 Question These buttons nodes that I have a problem with seems to not receive the mouse click or mouse enter/exit input for some reason. There are no other control nodes blocking the screen as I've checked the debugger. The buttons nodes doesn't have the mouse filter as ignore. The other control nodes (that doesn't have the stop filter), even while not visible, still can receive the mouse click input. They do not overlap the buttons I have a problem with. What could possibly…

Game is completely pitch black (except canvas objects) on mobile web export

Godot Version 4.7 Question: Hello! I need some help with my Godot game, as it doesn’t render any non-canvas objects at all, making the whole thing pitch black. I exported it with compatibility renderer. Here’s how the game looks like on mobile web: And what it’s supposed to look like (this is on my laptop): What I noticed is that previously, when I exported it to web on Godot 4.6, it rendered the big, grey part of the map as pitch black: I’ve tried getting rid of a canvas object that covers the…

Editor View/In Game camera not positioned the same

Godot Version 4.7.2 Question Hello, I’ve been running into an issue where my scenes are lined up correctly within the editor like so: In the image above, I have a player in the center (0,0) and a Camera2D that follows that player around, outside the view of the camera is a Path2D that I’m using to randomly spawn enemies from outside of the screen that will move towards the player. However, once in game it appears as if the Path2D is actually here: Where the red square that I’ve drawn in. Which…

Getting computed tile map layer physics polygons

Godot Version 4.7 Question I have a class based off of tile map layer. It uses a tileset that has a physics layer on every tile. I use this to detect if any mobs or objects enter the tile map layer. For the objects, I use area2d’s on_body_entered signal to check if they collide with the tile map layer I also want to detect if two tile map layers collide. From what I understand, tile map layers don’t have a behavior similar to area2d’s on_body_entered, so I need to attach an area2D to the tile…

Imported mesh only shows Vertex Colors on material in first slot

Godot Version Godot 4.7 Question Hello there! I’m trying to make a mesh imported from Blender to Godot with multiple materials show its Vertex Colors for all surfaces/materials of the mesh. Right now I can only make the mesh display the Vertex Colors on the material assigned to the first slot, which I find really strange. As I understand, the Vertex Color data should be stored in the mesh, and as such, any material with “Use As Albedo” turned on should display it, but it’s always only the first…

RichTextLabel takes normal font size property in exported project

Godot Version v4.7.2.stable.mono.official Question I have several RichTextLabels with “[b]” BBCode on them and I set bold font size to 110 px in Theme Overrides. For some reason, they’re taking Normal Font size and not bold one when I’m exporting the game. In the editor everything is fine. Is there a way to solve this without adjusting everything with normal font? 3 posts - 2 participants Read full topic

How to fix unknown error

Godot Version 4 Question There is a bug I don’t know how to fix can someone please help. The game is 2d. If you share code, please wrap it inside three backticks or replace the code in the next block: if Input.is_action_just_pressed("flammas spear") and func _on_hurty_hurter_flamma_area_entered(): var sparta_hp = 0 pass 2 posts - 2 participants Read full topic

Help trying to render cosmic/planetary-scale objects

Godot Version Godot .NET 4.7.2 Question I’m trying to create a space game that will try to be as scientifically accurate as possible, so that means rendering planets and objects at true-scale (at least, as if they were in true-scale). Of course, since this is not possible naively, I’ve been looking into ways to get around these constraints. I am looking for suggestions from y’all as to how I can do this; I can think of a few ways but am struggling to find actual methods of implementation for…