Questions tagged [godot4]
for questions regarding usage of the Godot game engine, specifically version 4.0+
godot4
601
questions
0
votes
0
answers
4
views
Why is it that when I use set_shader_parameter, the sprite dissapears instead of changing to the state I set it to?
Godot 4.2
I have a shader that changes the hue of an AnimatedSprite2D. Here is the shader:
shader_type canvas_item;
uniform vec4 color : source_color;
void fragment(){
vec4 pixelColor = texture(...
1
vote
0
answers
9
views
Import Array to Godot via CSV
I'm currently making a game in Godot using CSV tables to help keep track of things. Most stuff works, except when I want to import a column as an array. How would I format this array in a CSV so ...
0
votes
0
answers
11
views
How do I make a 2D Sprite move in a random direction but not go offscreen
I'm trying to make one of those Cookie Clicker-esque games where the things you are supposed to be clicking randomly move away from you, and while I got the menus working, getting the actual stuff to ...
0
votes
1
answer
13
views
Issue With 2d Noise
I'm making a top down survival game and I have done a procedural world gen using noise2D (FastNoiseLite). The next step was to randomize the seed, but I can't figure out how to...
Thanks
I tried :
@...
0
votes
0
answers
14
views
Escape Block Textures Not Loading After Leaving First Room
Godot Version: v4.2.stable.official [46dc27791]
I am trying to have an escape block with a TextureRect that has two different textures--an animated one where it's awake and an inanimate one where it's ...
1
vote
1
answer
23
views
How do you add unique instances of a shader to multiple nodes in a scene? Godot 4
I have multiple "interactable" objects in my game all extend the InteractableBody class that sets some stuff up so the player can interact with the object. I am trying to add an outline ...
0
votes
0
answers
19
views
In Godot 4.3 (beta3), avoid obstacle in new TileMapLayer node
I don't understand how to handle obstacles (areas with physics layers) from TileMapsLayers with NavigationAgent2D path.
This is what I have so far.
I have a simple scene world with only 2 ...
1
vote
1
answer
19
views
Spatial vertex shader: what are the actual values?
I am trying to understand spatial shaders in Godot and have a simple vertex shader:
shader_type spatial;
void vertex(){
VERTEX.y -= VERTEX.x;
}
I applied it to a sphere with this result:
So it ...
0
votes
1
answer
61
views
Slow Ollama API - how to make sure the GPU is used
I made a simple demo for a chatbox interface in Godot, using which you can chat with a language model, which runs using Ollama. Currently, the interface between Godot and the language model is based ...
0
votes
0
answers
29
views
How to use the godot-llama-cpp plugin
Godot newbye here. I made a simple chatbot demo (repo here) in Godot, which takes as input the text typed by a user and outputs the replies generated by a large language model running locally using ...
0
votes
1
answer
51
views
Can't print to console in Godot 4 C#
I create a new project, add a root Node2D called 'Level' and attach a script:
using Godot;
using System;
public partial class Level : Node2D
{
// Called when the node enters the scene tree for ...
0
votes
3
answers
158
views
Error "name 'BoolVariable' is not defined" when using SCons on Godot with C++
I'm trying to use Godot with C++ on Windows and I'm following the GDExtension guide.
When I get to the part where I have to build the C++ bindings and I execute scons platform=windows I see this:
...
1
vote
1
answer
18
views
Godot4. How to detect collisions ONLY by the first iteration
I have the following problem in Godot Engine: How to detect collisions only the first iteration when Node2D enters the tree?
I'm using Area2D which is 💥 "Explosion" in my game and it has to ...
1
vote
1
answer
14
views
Is it possible to access an autoloaded node's CLASS, not itself as an instance?
I get the gist of how autoloaded nodes work. They each get plopped into the tree as a singleton first thing, and they're accessible from basically anywhere at runtime using their class names.
Suppose ...
1
vote
2
answers
28
views
My 2d godot player doesn't identify the ground
I want to define when the player touches the ground, some things happen, but it always identifies that it doesn't come into contact with the ground.
My version of Godot is 4.2.2.
This is my code:
...