Godot Forum - Latest topics https://forum.godotengine.org/latest Latest topics Fri, 24 Apr 2026 15:44:23 +0000 V4.7.dev5.official [a8643700c] Linux - How To Install Export Templates From Local File? Help Godot Version

v4.7.dev5.official [a8643700c] - Linux x86_64

Question

We just started using dev5 of Godot Engine v4.7 on Linux.

Something is either missing or we are not seeing it:
How to install export template from local file?
We only see in export template manager the ability to download templates from Web?

Let us know, thanks!

SS

1 post - 1 participant

Read full topic

]]>
https://forum.godotengine.org/t/v4-7-dev5-official-a8643700c-linux-how-to-install-export-templates-from-local-file/137610 Fri, 24 Apr 2026 15:44:23 +0000 No No No forum.godotengine.org-topic-137610 V4.7.dev5.official [a8643700c] Linux - How To Install Export Templates From Local File?
Weird bug with AnimatableBody platforms as child of Parallax2D node Physics Godot Version

Godot 4.6.2 stable mono

Question

How do I fix the following weird bugs I’ve found with my AnimatableBody platforms as child of Parallax2D node ?


Hi ! I’m currently working on the implementation of a fake 3D-depth effect in my 2d game, where I can send to player in backgounds layers, that are childs of Parallax2D node.

My plan was to integrate moving platforms (AnimatableBody2D) into those layers, like Donkey Kong Country Returns. The problem is when my player tries to stand on one of those platforms, whether they are moving or not, my player is suddenly pushed sideways until it falls down, a bit like if the parallax was “pushing” the player if the latter moves.

As for the animated platforms (I have used Tweens), when I move, so the camera too, the platforms become really jittery.

Here are some images and videos that shows the issue :

  • Node Structure

  • The issue in video :

As you can see in the clip, when I jump onto the background tilemap, nothing happens as it a StaticBody2D

Do you have any clues on why does that happen ?

1 post - 1 participant

Read full topic

]]>
https://forum.godotengine.org/t/weird-bug-with-animatablebody-platforms-as-child-of-parallax2d-node/137608 Fri, 24 Apr 2026 15:10:10 +0000 No No No forum.godotengine.org-topic-137608 Weird bug with AnimatableBody platforms as child of Parallax2D node
How To Change Color Of Black Borders? Help Godot Version

v4.6.2.stable.official [71f334935] - Linux x86_64

Question

Hi,

How can we change the color of the black borders, please see screenshot below:
Thanks!

SS

2 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/how-to-change-color-of-black-borders/137607 Fri, 24 Apr 2026 14:53:28 +0000 No No No forum.godotengine.org-topic-137607 How To Change Color Of Black Borders?
Handheld orientation sensor: How to adjust viewport size? Help Godot Version

Godot 4.6

Question

Hi…,

I want to use Portrait and Landscape mode for my iOS app. This works, when I set Project Settings… → Display → Window → Handheld → Orientation → Sensor.

  1. How to check, when the sensor changes the orientation?
  2. How to change the viewport size, that it fits to portrait, and landscape mode?

Thanks

Mike

2 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/handheld-orientation-sensor-how-to-adjust-viewport-size/137604 Fri, 24 Apr 2026 14:22:39 +0000 No No No forum.godotengine.org-topic-137604 Handheld orientation sensor: How to adjust viewport size?
Realistically, how complicated is implementing multiplayer in Godot? Networking Godot Version

Godot 4.x

Question

TLDR: i’m interested in developing mostly multiplayer games, after moving from ROBLOX, and I wanted to know what my options are and how likely I am to go insane attemping to do so as a solo dev.

Hello! I’m a developer who just moved from ROBLOX, after policy changes that requires devs on the platform to pay a monthly subscription to publish games.

One of the reason why I stuck with Roblox for so long, despite its limitation, was the great built-in community and multiplayer features available out of the box. I always enjoyed multiplayer experiences, especially those that are community driven and require communicating with others.
I want to add that Godot and GDScript seem pretty “easy” so far, as someone used to Roblox Studio’s interface and LUA. The nodes system is pretty straightforward and the interface not overwhelming at all.

Now, I was almost considering going with Unity because it seems to have pretty robust multiplayer support with stuff like client-side prediction… however, Unity and Roblox to me are two faces of the same coin: both are ran and owned by greedy corporations whose only interest is profit, so I don’t feel like putting up with the bs Roblox put me thru for ages…

Now, what are my options? How complex is multiplayer and netcode? I know that Godot has some highlevel API but I wonder how robust and scalable it is. Granted, I’m not planning to release the new gen open-world MMORPG. I always preferred more intimate RPG experiences with a tight-knit community, avatar customization, roleplay features and maaaaybe some simple combat. Nothing extensive but solid.

11 posts - 6 participants

Read full topic

]]>
https://forum.godotengine.org/t/realistically-how-complicated-is-implementing-multiplayer-in-godot/137601 Fri, 24 Apr 2026 14:12:41 +0000 No No No forum.godotengine.org-topic-137601 Realistically, how complicated is implementing multiplayer in Godot?
Will Upcoming Godot Engine Version 5.0 Be 100% Backward Compatible With Version 4.x.x? General Hi,

The Godot Engine development team rapidly releases updated versions of Godot Engine.

Will upcoming version 5.0 be 100% backwards compatible with version 4.x.x ?
Also, any chance for adding back the visual scripting to version 5.0 ?

Nice work people, keep it up!

SS

5 posts - 5 participants

Read full topic

]]>
https://forum.godotengine.org/t/will-upcoming-godot-engine-version-5-0-be-100-backward-compatible-with-version-4-x-x/137600 Fri, 24 Apr 2026 13:35:54 +0000 No No No forum.godotengine.org-topic-137600 Will Upcoming Godot Engine Version 5.0 Be 100% Backward Compatible With Version 4.x.x?
How to approach modifiable item stats Programming Godot Version

4.6 stable

Question

I would like to make a character equipment system where items themselves can have upgrades slotted into them, sort of like “gem slots” in some games. For now, I’m just trying to figure out numerical stat upgrades, not any more complex effects.

So, for example, some item has a “defense” stat (or “modifier”) that, when equipped, gives a character +5 defense.

Then, there is a special type of item, like the aforementioned gems, which can be equipped to items like that to temporarily increase the defense buff until unequipped. In the example above, there could be a gem that specifically looks for some “defense” stat, then increases it by +3, so when a character equips it, it gives a total of +8. I’d like percent modifiers to be possible too, so there could be a gem that gives a +10% bonus, for example.

I have read lots of different articles and tutorials on stat/modifier systems, and I can implement the basics there. I know, for example, that I’d like characters to have a dictionary of stats. Then there can be a “Modifier” class which holds data about its value and math operation, and such Modifiers are used to calculate final stat values. I’ve implemented such a system before to some extent, but I’m still pretty inexperienced.

To achieve what I’m talking about above… I have a few ideas, but none of them feel very good, and I haven’t been able to find much online about it. It seems like I’ll basically need to make the Modifiers… modifiable.

How would you approach this idea?

7 posts - 4 participants

Read full topic

]]>
https://forum.godotengine.org/t/how-to-approach-modifiable-item-stats/137599 Fri, 24 Apr 2026 13:21:45 +0000 No No No forum.godotengine.org-topic-137599 How to approach modifiable item stats
How do I add sound to walking? Programming Godot Version

v 4.4

Question

I am trying to add a walking sound to my player. It's a simple top down 2d game with 4-directional movement.I have a simple mp3 that should start playing whenever character is in motion. I am trying to use AudioStreamPlayer node.

What I figure out so far is that the sound receives start( ) every process(second/tick?), so it starts playing from the beginning continuously, resulting in no sound at all. But when the movement stops, the sound continues to play. So everything happens oppositely. I tries using playing( ) attribute, but that didn’t help, it’s like the code is ignoring it.

My code is quite simple, I am trying to avoid using state machine, as my game won’t really have anything besides idle and run modes. I have searched far and wide, but seemingly this simple problem is beyond me. Could someone advice where would I put play( ) and stop( ) for this to work?

All idea would be greatly appreciated.

extends CharacterBody2D

@export var movement_speed : float = 150
var character_direction : Vector2
var last_direction : Vector2 = Vector2.RIGHT
@onready var RunSound: AudioStreamPlayer = $RunSound
@onready var sprite_animation_body: AnimatedSprite2D = $Sprite_animation_body

func _physics_process(_delta: float) → void:
process_movement()
process_animation()
move_and_slide()

func process_movement() → void:
character_direction = Input.get_vector(“move_left”,“move_right”,“move_up”,“move_down”)
character_direction = character_direction.normalized()
if character_direction != Vector2.ZERO:
velocity = character_direction * movement_speed
last_direction = character_direction
else:
velocity = Vector2.ZERO
pass

func process_animation():
var type : String
if velocity != Vector2.ZERO:
type = “run”
else:
type = “idle”
play_animation(type, last_direction)
pass

func play_animation(type: String, direction: Vector2):
if direction.x > 0:
sprite_animation_body.play(type+“right”)
elif direction.x < 0:
sprite_animation_body.play(type+“left”)
elif direction.y > 0:
sprite_animation_body.play(type+“down”)
elif direction.y < 0:
sprite_animation_body.play(type+“up”)
pass

7 posts - 3 participants

Read full topic

]]>
https://forum.godotengine.org/t/how-do-i-add-sound-to-walking/137598 Fri, 24 Apr 2026 13:19:39 +0000 No No No forum.godotengine.org-topic-137598 How do I add sound to walking?
Godot Architecture: 7 steps for more flexible, extensible, testable code (video) Tips & Tricks Hello!

I made a video about how I like to structure my projects, including a refactor of some of my older code.

Godot Game Architecture: 7 Tips for Extensible, Readable, Testable Game Code

This is probably not a good use of time on a very small project, but larger and collaborative projects tend to benefit from more structure. Most of these techniques are about increasing readability and decreasing coupling, and culminate in fairly unit-testable code (if anyone wants that?). Anyways, all of these are tools you can take or leave, but I do explain some of the benefits!

Here’s what I go through:

- (briefly) static typing

- removing autoloads and moving to a simple version of dependency injection

- restructuring our “main scene” to provide hierarchical contexts that manage their own non-global services

- blowin’ up the signal hub and localizing signals

- colocating code and other assets into feature-group folders with maximum cohesion and minimal outside dependencies

- setting up unit testing with GDUnit

- probably some other stuff too, I don’t remember, it’s been a long day

There’s lots more I’d like to do but these are, I think, useful for a lot of projects.

Anyone else have any essential architecture best practices?

1 post - 1 participant

Read full topic

]]>
https://forum.godotengine.org/t/godot-architecture-7-steps-for-more-flexible-extensible-testable-code-video/137595 Fri, 24 Apr 2026 12:11:12 +0000 No No No forum.godotengine.org-topic-137595 Godot Architecture: 7 steps for more flexible, extensible, testable code (video)
Help with if statement working when it should not Help Godot Version

4.6.2

Question

So in short I am trying to make a regenerating shield for a ship, the shield health is part of my stats component.

here’s the issue, this is part of my code is supposed to check if my shield health is 0 then run the regen func to wait 5.0 sec then set my shield health to 100 then put my hurtbox back to active state then play the shield animation reforming then print for me my current shield health.

this all happens, but for some reason regen wont stop … it just keeps printing my shield health over and over like 600 lines a second, in game the shield looks like it works … i break it and in about 5 sec it reforms but after a bit it gets wonky and seems to take longer to break the shield, pointing at the possibility that its constantly being reset to 100 health over and over.

what confuses me is the if statement is checking for the health to be 0 and I know after regen the shield health is 100 (the print out tells me this 600 times a sec) so I don’t understand why regen is firing off over and over.

TLDR:

after the if statement fires and runs regen, regen wont stop running even when the if statement cant be triggered

func _physics_process(_delta: float) -> void:
	if stats_component.health == 0:
		regen()
	

func regen() -> void:
		await get_tree().create_timer(5.0).timeout
		stats_component.health = 100
		hurtbox_component.is_invincible = false
		animated_sprite.play("activate")
		print(stats_component.health)

11 posts - 4 participants

Read full topic

]]>
https://forum.godotengine.org/t/help-with-if-statement-working-when-it-should-not/137593 Fri, 24 Apr 2026 11:43:50 +0000 No No No forum.godotengine.org-topic-137593 Help with if statement working when it should not
How to y sort on tilemaplayer? Help Godot Version

4.5.1

Question

im trying to create a wall with tilemaplayer, the player needs to go in front of hit when below and behind when on top of it (basic perspective). i created a main node with the player and a node called Textures that has the tilemaplayer of the walls in it. i turned on the y sort on the main, on the node Textures (in the main), on the tilemaplayer and his father node, but still doesnt’t work. Can you help please?

3 posts - 3 participants

Read full topic

]]>
https://forum.godotengine.org/t/how-to-y-sort-on-tilemaplayer/137591 Fri, 24 Apr 2026 10:59:44 +0000 No No No forum.godotengine.org-topic-137591 How to y sort on tilemaplayer?
"Random" infinite freezing without errors - a tool for tracking internal processes? Help Godot Version

4.6.2 Stable

Question

And so, the essence of the error is stated in the title - when testing the game, it periodically just freezes forever, without reporting any recursion errors or anything like that. The problem is that the game I’m working on is very, very complex (it’s kind of a mix of Kenshi and Terraria) so actually, I can’t provide any code, because I have no idea which of the code snippets of the codebase itself is causing the error (there are currently 36.000 lines of code in the project) - just the Gdscript. I suspect that the error has something to do with the UI and the recalculation of Control’s sizes and containers, since the UI in the game is complex and it looks like the problem appeared somewhere at the stage of adding its ui logic, but since it is impossible to debug the problem, I actually do not know what exactly I should fix.

Therefore, my question down to the following: is there a way to constantly monitor the processes taking place inside the game so that, in the event of an infinity freeze, I can see in some third-party analyzer the current task that the game is trying to complete?

1 post - 1 participant

Read full topic

]]>
https://forum.godotengine.org/t/random-infinite-freezing-without-errors-a-tool-for-tracking-internal-processes/137590 Fri, 24 Apr 2026 10:26:29 +0000 No No No forum.godotengine.org-topic-137590 "Random" infinite freezing without errors - a tool for tracking internal processes?
Lightmaps break on another team members PC when pulling latest (using git - godot 4.6.2) Help Godot Version

4.6.2

Question

At the company we’re working in compatibility mode for VR - specifcially mobile headsets. Part of that is keeping it as low weight as possible; which means we rely entirely on Lightmaps.

But I have found an issue now among a couple of team members across different projects (all using same version/compatibility mode) where lightmaps look vastly different; or materials are not applied correctly on some meshes (less than a handful) when they pull latest - these are also not material issues, but seems to be individual sub-meshes not having a material - despite one is applied during mesh import.

It means our builds have discrepancies between what has been made and pushed to the project.

Checking, I can see all Lightmap arrays have been filled and lightmaps exist - however it is as if they are wrapped to the wrong model. Even simple project using a single lightmap has been an issue between our team.

This is both between MAC/PC users but also PC/PC users exclusively.

Does anyone know how to solve these decrepencies we see in the graphics pipeline - when working multiple people on a project, using git LFS?

2 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/lightmaps-break-on-another-team-members-pc-when-pulling-latest-using-git-godot-4-6-2/137587 Fri, 24 Apr 2026 08:05:32 +0000 No No No forum.godotengine.org-topic-137587 Lightmaps break on another team members PC when pulling latest (using git - godot 4.6.2)
load an use cpp extension during runtime Programming Godot Version

4.6.2

Question

Hello all,
I need to load a extension + pck during runtime.
The extension is not available at point of time the app starts.

The extension in cpp which works perfectly fine if it is available at startup in the first place.

I am using

GDExtensionManager.load_extension("res://my_extension.gdextension")

to load the extension.
This works and the return status is LOAD_STATUS_OK
For further checks I see my extension in the returned list of:

GDExtensionManager.get_loaded_extensions()

To check if the classes of the extension are available I check

ClassDB.get_class_list()

to contain my classes of the extension.

Additionally I check if it is possible to instantiate a object of it

ClassDB.can_instantiate("MyExtensionClass")

All this seems to be correct and the classes should be useable.

After the extension got loaded I load a additional pck and use a gdscript out of it which uses the class of the extension.

load("res://from_pck_loaded_script.gd")

I have the following observation:
I can do

ClassDB.instantiate("MyExtensionClass")

But I cannot do

extends MyExtensionClass
#or 
MyExtensionClass.new()

and that’s the issue. It stops the app directly.

Also the following causes issue

var test:MyExtensionClass 
test = ClassDB.instantiate("MyExtensionClass")

This produces a error during runtime but the app continues to run

write_assign_with_conversion: Compiler bug: unresolved assign.

I would like to use the extension classes without any limitations during development.

Can someone explain why it doesn’t work as expected and how to overcome it?

Thank you very much in advance

2 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/load-an-use-cpp-extension-during-runtime/137586 Fri, 24 Apr 2026 08:05:25 +0000 No No No forum.godotengine.org-topic-137586 load an use cpp extension during runtime
Emergency i here pelpol talking a bout version controll but how do i use it? General emergency i here pelpol talking a bout version controll but how do i use it? please it is my snake game i’m working on

8 posts - 5 participants

Read full topic

]]>
https://forum.godotengine.org/t/emergency-i-here-pelpol-talking-a-bout-version-controll-but-how-do-i-use-it/137584 Fri, 24 Apr 2026 07:11:54 +0000 No No No forum.godotengine.org-topic-137584 Emergency i here pelpol talking a bout version controll but how do i use it?
2D TopDown Movement and Animation hiccups Help Godot Version

4.6.2 Stable

Question

Godot beginner here, go easy on me. Thanks in advance.

Issue 1: If I’m moving Right and then add Up and Down, everything behaves as expected but if I am facing Right (no velocity) and just press up or down, the sprite moves up and down and then flips to face the Left once I stop pressing the button. Additionally Left and Right trigger the animations just fine but Up or Down by themselves stay in the idle animation and just slide Up or Down.

To note: My player is separated into three AnimatedSprite2Ds: Body, Head, and Gun

Issue 2: Input: Down + Right = player moving down and right (diagonally) and the PlayerHead and PlayerGun rotate to match the angle. Continue pressing Down but switch to Left = the same thing, to the left, as wanted.
But if I press Sprint while doing the same thing, the player will move down + left but the head and gun rotate to point Up and Right.

Issue 3:
My code for rotating the head and gun to match the angle works on the Left, Right, and Diagonals but doesn’t do anything for just straight Up or Down. I feel like there’s a connection but I can’t see it.

I’m stumped.

My goal is to have 8 directions. The body can face in 2 directions, left and right. The head and gun can face in 2 directions, left and right, but can be rotated to “point” in all8 directions. I had this working at one point but between adding actual left frames, ditching flip_h in the process and trying to implement new features and systems, I completely broke it and had to start fresh. So here I am.

I do not want to post my code for anyone to see but I need some help so I’m sorry for anyone who sees it lol I’ve been at this project and others (basically the same one just restarted over and over) for like 10-12 hours a day for a solid week or so now so I’m willing to be that it’s a simple fix but I can’t look at code anymore, I’m positive that my brain is actually changing what I see to look right at this point lol

Here’s a video showcasing the issues. Pretty sure the quality is going to take a massive dive, so sorry in advance, hopefully it still gets the point across.

extends CharacterBody2D


var speed: int = 10
var speed_scale: float = 1.5
var direction: Vector2
var look_direction: Vector2 = Vector2.RIGHT
var is_sprinting: bool = false
var is_strafing: bool = false
var is_reloading: bool = false
var is_shooting: bool = false


func _physics_process(_delta: float) -> void:
	get_input()
	movement()
	move_and_slide()
	animation()

func get_input():
# DIRECTIONAL INPUT
#--------------------------------------------------------------
	direction = Input.get_vector("left", "right", "up", "down")
	if direction != Vector2.ZERO:
		velocity = direction * speed
		look_direction = direction
	else:
		velocity = Vector2.ZERO

# MOVEMENT INPUT
#--------------------------------------------------------------
	if Input.is_action_pressed("sprint"):
		is_sprinting = true
		velocity *= speed_scale
	else:
		is_sprinting = false

	if Input.is_action_pressed("strafe") and velocity !=Vector2.ZERO:
		is_strafing = true
		direction.x *= -1
		velocity.y = 0
	else:
		is_strafing = false

# ACTION INPUT
#--------------------------------------------------------------
	if Input.is_action_just_pressed("shoot"): #add shoot timer here
		print("shoot")
		shoot()

	if Input.is_action_just_pressed("reload") and not is_reloading:
		print("reloaded")
		reload()
		
func movement():
# SPRITE MOVEMENT-BASED ROTATION
#--------------------------------------------------------------
	#if LEFT and UP and is NOT Strafing
	if direction.x < 0 and direction.y < 0 and not is_strafing:
		$PlayerWeapon.rotation_degrees = 45
		$PlayerHead.rotation_degrees = 20
	#if LEFT and DOWN and is NOT Strafing
	elif direction.x < 0 and direction.y > 0 and not is_strafing:
		$PlayerWeapon.rotation_degrees = -45
		$PlayerHead.rotation_degrees = -20
	#if RIGHT and UP and is NOT Strafing
	elif direction.x > 0 and direction.y < 0 and not is_strafing:
		$PlayerWeapon.rotation_degrees = -45
		$PlayerHead.rotation_degrees = -20
	#if RIGHT and DOWN and is NOT Strafing
	elif direction.x > 0 and direction.y > 0 and not is_strafing:
		$PlayerWeapon.rotation_degrees = 45
		$PlayerHead.rotation_degrees = 20
	#if last dir_x was LEFT and we go down
	elif look_direction.x < 0 and direction.y == 1:
		$PlayerWeapon.rotation_degrees = -90
		$PlayerHead.rotation_degrees = -45
	#if last dir_x was RIGHT and we go down
	elif look_direction.x > 0 and direction.y == -1:
		$PlayerWeapon.rotation_degrees = -90
		$PlayerHead.rotation_degrees = -45
	elif look_direction.x > 0 and direction.y == 1:
		$PlayerWeapon.rotation_degrees = 90
		$PlayerHead.rotation_degrees = 45
	elif look_direction.x < 0 and direction.y == -1:
		$PlayerWeapon.rotation_degrees = 90
		$PlayerHead.rotation_degrees = 45
	#------------------------------------------------------------
	#rotation of the weapon sprite when strafing
	#------------------------------------------------------------
	#if LEFT and UP and IS Strafing
	elif direction.x < 0 and direction.y < 0 and is_strafing:
		$PlayerWeapon.rotation_degrees = 45
		$PlayerHead.rotation_degrees = 20
	#if LEFT and DOWN and IS Strafing
	elif direction.x < 0 and direction.y > 0 and is_strafing:
		$PlayerWeapon.rotation_degrees = -45
		$PlayerHead.rotation_degrees = -20
	#if RIGHT and UP and IS Strafing
	elif direction.x > 0 and direction.y < 0 and is_strafing:
		$PlayerWeapon.rotation_degrees = -45
		$PlayerHead.rotation_degrees = -20
	#if RIGHT and DOWN and IS Strafing
	elif direction.x > 0 and direction.y > 0 and is_strafing:
		$PlayerWeapon.rotation_degrees = 45
		$PlayerHead.rotation_degrees = 20
	#------------------------------------------------------------
	#this makes the rotation snap back to 0 when not pressing up or down
	else:
		$PlayerWeapon.rotation_degrees = 0
		$PlayerHead.rotation_degrees = 0

func animation():
	if is_shooting or is_reloading:
		return

	if velocity and not is_sprinting:
		if direction == Vector2.LEFT:
			$PlayerBody.play("walk_left")
			$PlayerWeapon.play("walk_left")
			$PlayerHead.play("walk_left")
		elif direction == Vector2.RIGHT:
			$PlayerBody.play("walk_right")
			$PlayerWeapon.play("walk_right")
			$PlayerHead.play("walk_right")
		elif direction.x < 0 and velocity.y != 0:
			$PlayerBody.play("walk_left")
			$PlayerWeapon.play("walk_left")
			$PlayerHead.play("walk_left")
		elif direction.x > 0 and velocity.y != 0:
			$PlayerBody.play("walk_right")
			$PlayerWeapon.play("walk_right")
			$PlayerHead.play("walk_right")

	if velocity and is_sprinting:
		if direction == Vector2.LEFT:
			$PlayerBody.play("run_left")
			$PlayerWeapon.play("run_left")
			$PlayerHead.play("run_left")
		elif direction == Vector2.RIGHT:
			$PlayerBody.play("run_right")
			$PlayerWeapon.play("run_right")
			$PlayerHead.play("run_right")

	if velocity == Vector2.ZERO:
		if look_direction.x > 0:
			$PlayerBody.play("idle_right")
			$PlayerWeapon.play("idle_right")
			$PlayerHead.play("idle_right")
		else:
			$PlayerBody.play("idle_left")
			$PlayerWeapon.play("idle_left")
			$PlayerHead.play("idle_left")

func shoot():
	is_shooting = true
	if look_direction.x > 0:
		$PlayerWeapon.play("shoot_right")
		$PlayerHead.play("shoot_right")
	elif look_direction.x < 0:
		$PlayerWeapon.play("shoot_left")
		$PlayerHead.play("shoot_left")
	await $PlayerHead.animation_finished
	await $PlayerWeapon.animation_finished
	is_shooting = false

func reload():
	is_reloading = true
	if look_direction.x > 0:
		$PlayerWeapon.play("reload_right")
		$PlayerHead.play("reload_right")
	elif look_direction.x < 0:
		$PlayerWeapon.play("reload_left")
		$PlayerHead.play("reload_left")
	await $PlayerHead.animation_finished
	await $PlayerWeapon.animation_finished
	is_reloading = false

1 post - 1 participant

Read full topic

]]>
https://forum.godotengine.org/t/2d-topdown-movement-and-animation-hiccups/137583 Fri, 24 Apr 2026 05:52:03 +0000 No No No forum.godotengine.org-topic-137583 2D TopDown Movement and Animation hiccups
Changing between alpha channel using if statement Shaders Godot Version

Godot_v4.6.1-stable

Question

I have encounter a very strange problem, I was building a cel shader with varies function and everything works exactly that it should but, when i tried to switch the alpha

eg. making it use alpha or alpha scissor

i have encounter a very strange issue.

The very strange thing happens is if i only put the following code in one file:

//alpha 
vec4 albedo_tex = texture(albedo_texture, base_uv);
ALPHA *= albedo_tex.a;
ALPHA_SCISSOR_THRESHOLD = alpha_scissor_threshold;

or only this:

//alpha 
vec4 albedo_tex = texture(albedo_texture, base_uv);
//ALPHA *= albedo_tex.a;
ALPHA = alpha;

it works according what i have planned.

However, the issue arises when i combined it using an if else statement and a Boolean or anything that can makes a switch between 2 style, only alpha scissor works and the alpha makes the mesh straight up disapear if the value is less than 1.0

May I what is the best course of action how to tackle this problem or how do I solve it? Preferably, i would like to have a single file instead of 2 shader file.

9 posts - 3 participants

Read full topic

]]>
https://forum.godotengine.org/t/changing-between-alpha-channel-using-if-statement/137580 Fri, 24 Apr 2026 05:36:04 +0000 No No No forum.godotengine.org-topic-137580 Changing between alpha channel using if statement
Pieces for breakable box object only display shadow when mesh is being viewed in the editor Help Godot Version 4.5

I’ve been putting off this issue for a while because I really don’t understand what to make of it. I have a 3D box object that instantiates a broken box object with many individual rigidbody3D pieces, and these meshes all have shadows set to double-sided. Whenever viewing any of these meshes in the editor and running the project, the shadows work. However if I click off of those meshes or close the scene, the shadows stop working entirely. I’ve tried to find issues similar to this but no luck. Any ideas what could cause something like this?

This is the code inside the box object that instantiates the broken box PackedScene:

#Spawn Broken Model
var broken_model_inst:Node3D = Broken_Model.instantiate()
broken_model_inst.transform = self.transform
get_parent().add_child(broken_model_inst)

This video shows how the shadows work the first 2 times when the box pieces scene is being viewed, but stops working once the scene has been closed:

8 posts - 3 participants

Read full topic

]]>
https://forum.godotengine.org/t/pieces-for-breakable-box-object-only-display-shadow-when-mesh-is-being-viewed-in-the-editor/137578 Fri, 24 Apr 2026 03:54:17 +0000 No No No forum.godotengine.org-topic-137578 Pieces for breakable box object only display shadow when mesh is being viewed in the editor
I think it’s more appropriate for the +Z axis to be the forward direction in Godot 3D. General Standard 3D asset exchange formats like FBX and glTF use the Y-Up Right-Handed coordinate system, just like Godot. However, the actual content of those files—such as characters—is typically authored to face +Z. This is known as LUF(+X: Left, +Y: Up, +Z: Forward). To truly align with industry standards, an engine should support both Y-Up and the LUF convention.

The reason for this convention is rooted in DCC tools like Maya; while the viewport camera in Front View looks toward -Z, the modeler naturally builds the front of the character facing the screen, which makes +Z the ‘forward’ direction from the character’s perspective.

As a game engine, the forward orientation of the models within the world is far more critical than the default camera direction. In this regard, Godot’s current -Z forward convention feels counterintuitive. If Godot were to transition to +Z as the forward direction, it would become a much more refined and industry-compatible engine. Given that UEFN has already adopted LUF and UE6 is expected to follow, Godot should also make this transition.

9 posts - 6 participants

Read full topic

]]>
https://forum.godotengine.org/t/i-think-it-s-more-appropriate-for-the-z-axis-to-be-the-forward-direction-in-godot-3d/137576 Fri, 24 Apr 2026 03:05:37 +0000 No No No forum.godotengine.org-topic-137576 I think it’s more appropriate for the +Z axis to be the forward direction in Godot 3D.
Shader clipping at edges of sprite! Please Help! Help Godot Version

v4.6.1

Question

How do I prevent my shader from clipping at the edges of the Sprite 2d like this?

shader_type canvas_item;

uniform float amount: hint_range(0,1);

uniform float wave_speed = 5.0; 
uniform float wave_freq = 1.0; 
uniform float wave_width = 2; 

uniform vec4 color: source_color;
uniform float transparency: hint_range(0.0, 1.0);

void fragment(){
	if (amount > 0.0) {
		vec2 wave_uv_offset;
		wave_uv_offset.x = (cos((TIME*wave_speed)+UV.x+UV.y*wave_freq*2.0)*wave_width*0.01) * amount;
		vec2 new_UV = vec2(UV.x+wave_uv_offset.x, UV.y);
		COLOR = texture(TEXTURE,new_UV);
		if (COLOR.a > 0.0) {
			vec4 mixed_color = mix(COLOR, color, amount);
			COLOR = mixed_color;
			COLOR.a -= 1.0 - clamp(transparency/amount, 0.0, 1.0);
		}
	}
}

4 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/shader-clipping-at-edges-of-sprite-please-help/137575 Fri, 24 Apr 2026 00:12:08 +0000 No No No forum.godotengine.org-topic-137575 Shader clipping at edges of sprite! Please Help!
How stable is Jolt 3D Physics? Physics Godot Version

4.6

Question

I’m considering recreating a project I made in Unreal Engine for funsies, that requires really stable contact point and friction handling on many fast moving, custom collision shapes with lots of joints. Specifically, a mecanum wheeled vehicle. It’s wildly impractical for a game (as apposed to faking the mechanism), but I love mucking around with physics simulations. Before I dump my time into this, is jolt capable of this sort of heavy physics shenanigans?

3 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/how-stable-is-jolt-3d-physics/137574 Thu, 23 Apr 2026 23:51:26 +0000 No No No forum.godotengine.org-topic-137574 How stable is Jolt 3D Physics?
Damage Logic Issue Programming Godot Version

4.6

Damage Logic Issue

Hello, I am new to programming in general and I have a little problem with my HP loss logic. Initially the player's hurtbox was active all the time, which led to it to not detect spikes if the player stood on them while invincible and then the invincibility period ran out. I solved it by making the hurtbox disabled for the amount of time invincibility was on, but now I have another problem. If the p,ayer detects two damage boxes at the same time, it will take both damage hits inmediately, so I need to make sure that the player only recieves one hit at a time. How could I do that?

7 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/damage-logic-issue/137572 Thu, 23 Apr 2026 23:42:34 +0000 No No No forum.godotengine.org-topic-137572 Damage Logic Issue
V4.6.1 Lag in all aspects of Godot but no strain on hardware Help Godot Version

4.6.1

Question

Hi. We have installed Godot 4.6.1 on our school network. The previous version had no issues / problems(4.4). We install Godot from an image across all the computers and then use that version for the year. Since installing the new version (earlier in April) we have lag when moving the cursor around the screen. This lag is seen in all aspects of the game environment and also when running games. However, if we open a game produced with the earlier version in 4.6.1 there is no lag. Not in the user interface of the software or when a game is run. We have checked the load on the cpu and graphics card and it is nothing. I believe that the update was a maintenance one anyway and did not add any power hungry features. The changes were to improve performance. Has anyone got any ideas or tips?

Thanks.

2 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/v4-6-1-lag-in-all-aspects-of-godot-but-no-strain-on-hardware/137568 Thu, 23 Apr 2026 22:46:55 +0000 No No No forum.godotengine.org-topic-137568 V4.6.1 Lag in all aspects of Godot but no strain on hardware
Post-mortem of my failed attempt to vibe-code a metroidvania game General TLDR; Last Friday, I gave up on my vibe-coded game because I came to the conclusion that it was never going to work. I spent about 40 hours over a couple of months chasing a dream fueled by AI marketing hype. Vibe-coding full projects is largely a myth and today’s models and agents aren’t able to build anything more than prototypes. You can’t use AI to make up for not knowing GDScript or Godot. The time you spend fumbling around with AI would be better spent learning the technical skills.

If you’re a seasoned game developer, you already know this. I’m sharing this story for anyone out there who, like me, felt like learning game dev is an impossibly huge task and that AI might be the answer to that problem. I hope this can serve as a reality check to help stem the tide of “AI Slop” inundating society. Behind every “AI Slop” is someone that is naive and hopeful they could build something useful. Experts in every field have been screaming at the top of their lungs that vibe-coding is bunk for a while now, but I still thought that *maybe* they were wrong and I was smart enough to use AI to build something good. Now I’m just another disappointed Joe Schmoe. If the hoard of vibe-coders won’t listen to the experts, maybe they’ll listen to a former vibe-coder instead. Feel free to link them here when the next one shows up.

For background, I’m a 38 year old father of 5 who has a 15-year career in cybersecurity and who has always loved video games. Part of my day job is reviewing AI use cases for my company, and vibe-coding has come up a lot. I wanted to get a better understanding of what it is and how it works, so I figured I’d try out my own vibe-coding project to learn about it. I knew I needed something interesting or I’d lose focus quickly. I’ve always wanted to create my own game and had been taking notes on one for about a year. The La Mulana series is one of my favorites, and I can’t find anything else to scratch that itch. I figured I’d take a shot at building a spiritual successor. I had no idea if it would be successful or not. This was about trying something new and learning a career skill more so than ultimately completing a game. I needed to find out if vibe-coding is all about and if it is too good to be true (spoiler alert: it is).

The plan was that I’d be the product owner for the project with a strong vision for what I wanted and QA the crap out of it until it was exactly the way I wanted it. I’d then let AI handle all of the coding and other technical pieces. I had never written any GDScript or used Godot, but I’ve done programming in the past. I wanted to let AI be the technical muscle and I’d be the creative force and QA behind the game. In the back of my mind, I doubted this would ever work, but I wouldn’t know until I tried.

Things started out pretty well for me. I used the “Pro” and “Thinking” modes of Gemini to get the initial plan for the project. I’d build the game in Godot using Replit’s vibe-coding IDE, eventually moving to Cursor once I had a working prototype. The system was basically me describing what I wanted into Gemini Web and pasting that into Replit. I’d then go back and forth with Replit to debug the code that it wrote. Things were good for a while. I had a testing room and a player that could run, jump, climb ladders, read tablets, equip a scanner, and save/load. This was all within the first 3-4 hours. Life was great.

Then, I ran into some issues with enemies and combat. No matter what I did, nothing worked. Prompt after prompt didn’t fix anything and it often got worse. At 3am one night, I almost decided to delete the entire repo and quit. I held off and cooler heads prevailed.

I worked with the AI more to figure out what went wrong. This is where I really thought I had turned a corner. I didn’t let my initial failure stop me. I spent about 2 weeks learning what I should have all along. I still wasn’t going to learn GDScript or Godot (a truly atrocious decision in hindsight). But I was going to learn how to use AI tools to their fullest extent (which has the upside of helping me in my day job). I was going to be better, faster, and smarter this time around.

I learned a ton about context windows, MCP, pipelines, project management, game production, and several other areas. I decided to beef up my development pipeline and try again. I took time to distill my year’s worth of notes into a master vision for the project and other pre-production tasks. I wrote out the core narrative of the story. I set up a HacknPlan account to manage my game design, tasks and milestones. I configured MCP servers for my Godot project, Godot language server, HacknPlan project management, and my GitHub repo. I organized my work into a roadmap with milestones and sprints. I broke my AI chat sessions into unique personas for AI operations, game design, and project management. I used separate sessions for each feature branch to focus the context and save tokens. I automated building a skeleton of my project so the chat sessions could see my whole project at a glance. I set up Continue to run locally in VSCode. I integrated Continue AI agent with Google AI Studio at Tier 1 paid. In my mind, I created a game development juggernaut pipeline and a team of 4 or 5 specialized AI personas that should be able to address any of the shortcomings that led to my previous issues.

I finally got back into programming and my next task was migrating the game from a 16x16 grid to a 32x32 grid to better fit the 128-bit vision I had for the game. That broke a few things, and the AI agent struggled with my player script. Google AI Studio saved me by re-writing the entire file in my web browser. It became clear that the player script was too long for the AI agent to parse, so it was time for a refactor into a state machine. The design was great and eventually I got it working. So far so good, right?

It was around this time I took a break to work on another vibe-coded mini project. I built a dashboard for approximating the stress of a chess player during a game. It’s nothing earth shattering, but it worked and I was really happy with it. Beside the lazy “AI Slop” comments (it wasn’t slop, I spent 20 hours of my life doing QA, polishing, and documenting it), the feedback I got was that its human approximations weren’t good enough to be useful. I wished I had gotten that information sooner so I could have saved myself a ton of time and embarrassment by quitting early.

I took this mentality back to my game and decided I wanted to come to this forum and ask for a reality check. Before that I decided that I’d let my AI juggernaut try to do the finite state machine refactor to prove itself. I put my new pipeline to work and I got something that worked. It felt like a breakthrough. Before I asked for the community’s opinion I decided to ask the AI to do an adversarial analysis and find any glaring issues, and oh boy did it find some.

It turns out the AI agent took a ton of shortcuts creating the finite state machine. The state machine was basically a global variable the player script would check. None of the logic or functionality made it into the state machine. It was all still in the player script. I set out to do a hotfix for this and Continue choked on the codebase and mangled it. I switched to Cline which did a better job, but it still broke more things than it fixed. I’d paste the code the agents wrote back into Google AI Studio to validate it, and the code had all sorts of errors that ignored the specifications in the prompt. It was clear that I’d have to work through Google AI Studio as an IDE agent couldn’t handle what I needed it to do.

It was at this point I took a hard look in the metaphorical mirror. I used the refactor as a litmus test, and the AI system I built had failed. The hard truth is that I’d have to learn GDScript and Godot well enough to do it myself. If that’s the case, why even use AI. I was right back where I started. I knew all too well that I didn’t have the time to learn it all from scratch. It was time to give up the ghost and retire the project.

While the game development failed, my quest to learn if vibe-coding was too good to be true was complete. AI models and agents as they are right now just aren’t capable of building systems complex as a metroidvania video game. While they might work for single page web apps, metroidvanias (and most games in general) are highly choreographed chaos running at 60fps. While this is probably obvious to any of you that have been doing this for a while, there’s an influx of newbies like me to pretty much every field that have been sold the myth that anyone can do anything with AI. This post is for them.

Right now, AI agents are best used for quickly doing simple tasks or brainstorming high-level designs. There’s a murky middle area that’s too specific for web based sessions and too vast for IDE based agents. While the web based agents might have the domain knowledge, they’re not able to apply it across dozens of scripts. The agents can’t handle more than 2-3 scripts at a time. There’s not much you could build with AI that you couldn’t build yourself in the same amount of time while learning the actual technical skills as you go.

If there’s anyone out there that’s had success vibe-coding a full-length game, please let me know. I’d love to be wrong here. Until then, I hope this can be a cautionary tale to anyone else caught up in the current wave of AI hype.

11 posts - 8 participants

Read full topic

]]>
https://forum.godotengine.org/t/post-mortem-of-my-failed-attempt-to-vibe-code-a-metroidvania-game/137567 Thu, 23 Apr 2026 22:31:56 +0000 No No No forum.godotengine.org-topic-137567 Post-mortem of my failed attempt to vibe-code a metroidvania game
Unable to get custom C++ module to build following the docs Help Godot Version

Latest github pull

Question

Hello,

I was trying to port a custom FFT library, couldn’t get it to register with scons when running the build (already have successful builds running for Godot, so doesn’t seem to be the issue there)

I then paired it back to the basic example found at here

register_types.h

#include "modules/register_module_types.h"
void initialize_testing_module(ModuleInitializationLevel p_level);
void uninitialize_testing_module(ModuleInitializationLevel p_level);


register_types.cpp

#include "register_types.h"

#include "testing.h"

#include "core/object/class_db.h"

void initialize_testing_module(ModuleInitializationLevel p_level) {
	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
		return;
	}
	ClassDB::register_class<Testing>();
}

void uninitialize_testing_module(ModuleInitializationLevel p_level) {
	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
		return;
	}
	// Nothing to do here in this example.
}


testing.h

#pragma once

#include "core/object/ref_counted.h"

class Testing : Public RefCounted {
	GDCLASS(Testing, RefCounted);

	int count;

protected:
	static void _bind_methods();

public:
	void add(int p_value);
	void reset();
	int get_total() const;

	Testing();
}

testing.cpp

#include "testing.h"

void Testing::add(int p_value) {
	count += p_value;
}

void Testing::reset() {
	count = 0;
}

int Testing::get_total() const {
	return count;
}

void Testing::_bind_methods() {
	ClassDB::bind_method(D_METHOD("add", "value"), &Testing::add);
	ClassDB::bind_method(D_METHOD("reset"), &Testing::reset);
	ClassDB::bind_method(D_METHOD("get_total"), &Testing::get_total);
}

Testing::Testing() {
	count = 0;
}

SCSub

# SCsub

Import('env')

env.add_source_files(env.modules_sources, "*.cpp") # Add all cpp files to the build

config.py

# config.py

def can_build(env, platform):
    return True

def configure(env):
    pass

Am I missing something? Did using the name Testing alias something existing? I tried an alternate name and no avail there either.

Running scons inside the godot cloned root, with my added folders in godot/modules/mymodulename (Matching whatever the class registration is)

New to working with Godot, but not C++, although I’m unfamiliar with scons. When I logged a full clean build after deleting the bin and .dblite they never show up in the output for either my custom FFT module or the simple testing module folder.

2 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/unable-to-get-custom-c-module-to-build-following-the-docs/137562 Thu, 23 Apr 2026 21:41:26 +0000 No No No forum.godotengine.org-topic-137562 Unable to get custom C++ module to build following the docs
how to make a characterbody2D stick to a surface and slide around corners? Physics Godot Version

4.6.2

Question

All I want to do is have a characterbody2D object in sidescrolling 2D that goes left and right. When the object comes into contact with any corner, it should just stick to the surface and keep traveling, like a slug crawling a wall or ceiling. I don’t need any kind of gravity or jump or anything else.

This seems like it should be REALLY simple but I can’t figure out for the life of me how to make it work. None of the slope settings in characterbody2D make any difference at all, and the few solutions I can find online all involve raycasting downwards but that only catches outward angled cliff-like corners. It doesn’t account for interior corners and ceilings.

Am I just approaching this wrong? There has to be an easy way to do this that I’m just not getting.

2 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/how-to-make-a-characterbody2d-stick-to-a-surface-and-slide-around-corners/137561 Thu, 23 Apr 2026 21:41:17 +0000 No No No forum.godotengine.org-topic-137561 how to make a characterbody2D stick to a surface and slide around corners?
Hog Havoc - Free Combat Racing Game (Single & Local Multilayer "Party" Game) Games https://slidegrass.itch.io/hog-havoc

https://www.youtube.com/watch?v=KvSlw99FCQ4

Just uploaded Alpha to Itch.io - looking to get some feedback. Right now it’s single player + up to four local players split screen - peer 2 peer networking coming later in beta. Supports keyboard and controller input, with a really cool (at least I think so) spectating / play viewing system - 20+ cameras, drone & camera network, picture in picture mode - all with auto tracking / following, plus an optional CRT overlay for the retro look and more.

The standard store spiel:

Hog Havoc is the FREE low-poly combat racing hybrid that lets you play the way you like, alone or with friends (up to 8 players / bots) with split screen local or peer-to-peer multiplayer - no servers or live service required!

For the party gameplay experience, pick from two different courses: Survive an obstacle course with jumps, mud pits, map-fired balls and bizarre, unstable barrels - or brave the frenetic oval with hazards at every turn. Or combine both in epic free-range mode!

Dodge chaos balls or be set ablaze, slowed in mud, or sent sliding on ice. Grab balls that do the same to opponents or barrels - creating areas of mayhem with no escape.

Balls power your shooting and shield. Trick shot? More points. Careless? Hit a Checkpoint Chicken or the Big Pig guardian and get zapped - or face a ball barrage as revenge.

Multiple modes keep it fresh: pure races, knockout, collection, combat, speed runs, and hybrids. So do multiple environments: Race in the bright and colorful day, experience the spectacle of midnight pig racing, or add fog to either for more unpredictability!

Long for retro console gaming? Turn on head-to-head mode for up to 4 players on screen at once - and even add in a retro CRT overlay!

Spectate from your drone or the broadcast quality camera system you’ll wish your favorite AAA games had. While watching, you can command unique bots mid-race. Later on in phase two you can take on your friends in RTS mode, and in phase three you’ll be able to relax in tycoon mode, customize the park, and build your own Pig Racing Empire!

And it’s all optimized to run on older and lower-end hardware - so you don’t have to break the bank to play a free-to-play game.

Thanks for checking it out!

1 post - 1 participant

Read full topic

]]>
https://forum.godotengine.org/t/hog-havoc-free-combat-racing-game-single-local-multilayer-party-game/137560 Thu, 23 Apr 2026 21:41:12 +0000 No No No forum.godotengine.org-topic-137560 Hog Havoc - Free Combat Racing Game (Single & Local Multilayer "Party" Game)
Sky texture looks messed up compared to the original Shaders Godot Version

Godot 4.6

Question

Hey, I'm relatively new to Godot and I've tried to put a PanoramicSky for my game with the following texture:

image
However here’s how it looks in game/editor:


As you can see, it has these weird gray pixels and differently colored blue pixels for some reason. Any ideas on how I could fix this? I haven’t found anything online.

3 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/sky-texture-looks-messed-up-compared-to-the-original/137559 Thu, 23 Apr 2026 21:41:04 +0000 No No No forum.godotengine.org-topic-137559 Sky texture looks messed up compared to the original
Plugins for Twitch General Hi everyone!

What are some interesting plugins for Twitch for a Godot gamedev to use? I’m starting to streaming now and want to improve my channel.

5 posts - 4 participants

Read full topic

]]>
https://forum.godotengine.org/t/plugins-for-twitch/137556 Thu, 23 Apr 2026 20:25:49 +0000 No No No forum.godotengine.org-topic-137556 Plugins for Twitch
How does camera move in 3D space? Help Godot Version

v4.6.1

Question

I don’t understand very well how the code below works (it is used to move the camera in the 3D space)

var sensitivity: float = 0.002

func _unhandled_input(event: InputEvent) -> void:
	if event is InputEventMouseMotion:
		rotation.y = rotation.y - event.relative.x * sensitivity
		camera_3d.rotation.x = camera_3d.rotation.x - event.relative.y * sensitivity

4 posts - 2 participants

Read full topic

]]>
https://forum.godotengine.org/t/how-does-camera-move-in-3d-space/137554 Thu, 23 Apr 2026 19:34:58 +0000 No No No forum.godotengine.org-topic-137554 How does camera move in 3D space?