Questions tagged [godot]

Godot is a 2D and 3D open source game engine developed by Godot Engine community. It features a built-in development environment which runs on Windows, macOS and Linux and can create games targeting PC, mobile and web platforms.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

Godot 3.1: procedurally generating TileMap with AutoTiles

I'm making a start on a 2d top-down game in Godot, using a TileMap and OpenSimplex Noise to generate the terrain. It works pretty well, creating decent contiguous regions of different types of ...
0
votes
0answers
25 views

Godot native c++

I want to add java native interface cpp to be compiled to .so files in the apk in godot android export. Basically add android native jni c++ to godot. My first gamedev stackexchange question.
1
vote
1answer
35 views

Godot 3.1.2: Black lines / borders around Sprite

In Godot 3.1.2 using OpenGL ES2, black borders/ lines seem to form around some sprites I have imported. Usually they appear on top of the sprite but can also "border" around it. Being new to Godot ...
1
vote
1answer
47 views

How can I load an asset from a file after I exported the build?

I am seeking possibility to switch character textures for game, even after I have compiled and built the binary. For example I have a troll with a Sprite from "/assets/texture1.png" Now after the ...
2
votes
1answer
30 views

Godot _on_Area2D_area_entered not detecting

In my Scene I have a Node2D. I then Instanced the Player and Area2D nodes. The Area2D has a signal pointing to itself that prints test when run. Here is the Code For the Area2D. Nothing happens when ...
0
votes
1answer
36 views

Can't find sibling node, keeps giving “null instance”

I'm trying to set it up so that there are three buttons but only one can be toggled at a time. So when one button gets toggled it makes sure that the other two are not toggled. The code is trying to ...
0
votes
1answer
36 views

Is it possible to move buttons or other ui elements over each other dynamically in Godot?

What im trying to do is have it set up so that if the player clicks on a character their ability's will appear on the ui, but i want to use the same ui space for the other characters as well. So is ...
0
votes
0answers
27 views

How to get an autotile in Godot 3.1?

I wonder if there's a way to get an autotile just like a single tile using a get_autotile() GDScript function or something like that.
0
votes
1answer
32 views

How to make a 3D mesh invisible in Godot?

Just like the title says i'm trying to make the mesh disappear after a set value reaches zero. Current code is trying to simply turn the entity invisible so that later i can implement a resurrect ...
1
vote
0answers
24 views

Godot: How do I edit the exe icons of other sizes

I asked this question on Godot Q & A: https://godotengine.org/qa/53521/godot-program-icons Basically, my problem is that I want My executable file's icon to display my own custom icon instead ...
0
votes
1answer
24 views

“ui is not declared in current scope” error

I just started development for a game I have to design for school. When using gd in the script to make the character move right I get an error: ...
0
votes
0answers
33 views

Simple message box in gdscript / godot

I want a single line of code which shows a popup dialog with the words "Hello World!" and an "Ok" button. (I want something simple for now, I know how to make something more complicated but that ...
1
vote
2answers
37 views

How can I get the NodePath that points to the property, rotation, of the parent node?

The 2nd arg in interpolate_property takes a NodePath, but str of a path to a prop seems fine too. So I'd expect this to work: <...
2
votes
1answer
64 views

I cannot save my game data on Godot Engine

I'm trying to save my game on Godot Engine by pressing a "save" button but I get this message error when i do: Attempt to call function 'get_nodes_in_group' in base 'null instance' on a null ...
0
votes
1answer
30 views

How can velocity be normalized after a collision if a projectile needs to maintain its height?

I want a thrown disc to travel along the same height, even after collisions. The problem is, there's an edge case that I'm not sure how to deal with. The lowest-tech solution would probably be to ...
0
votes
1answer
41 views

Handling multiple agents in astar pathing

When working with grid based path finding in how do you normally handle different agent types? In the game I am working on I have a regular agent, and one that occupies 2 cells on the grid, and one ...
0
votes
0answers
137 views

What should be the display configuration for mobile game in Godot 3.1?

I am developing a mobile game in Godot so I want to know what should be the display configuration to show the game it should be, I tried before a Web Game, and when it was played on mobile games it ...
3
votes
1answer
105 views

What does the Node2D transform property do?

Following a Godot tutorial I encountered the transform property, but I'm not sure what it means nor how to use it. I read the official Godot documentation, but it ...
1
vote
2answers
51 views

How to script sequential events in GameMaker?

I am wondering if there is an elegant way to script sequential events in GameMaker 2. In Godot 3.1, it is very easy to chain events together using yield() and ...
0
votes
0answers
25 views

Animations suddenly not working at all

I have three animations, "ShowHit", "WarningFadeInAndOut", "ShowGameOver". They were worked when I was made, but suddenly only "ShowHit" is working. I double checked the logic was correct so that it ...
0
votes
1answer
27 views

Stop current animation and re-play immediately?

When the player hit something, I'm playing hit animation from animation_player. However when player hit something while hit animation is playing, it just ignored and play previous hit animation. I ...
1
vote
1answer
18 views

body_entered signal won't emit when rigidbody collided to rigidbody

I have multiple rigidbody object floating away in the space. When they hit each other, they push away each. I want to destroy object if they hit something, but connect body_entered signal won't ...
0
votes
1answer
45 views

Can't change anchor position and TextureRect size

I'm making UI, and want to set anchor to middle of the image, but changing anchor from Layout -> Anchors Only or setting Anchor value directly doesn't work. The value was updated, but anchor point not ...
1
vote
2answers
41 views

How to wait until other script is ready?

I have two scripts, first is AsteroidSpawner script that literally spawns object named Asteroid, and second is HUD that control all UI related stuffs. There are some labels in UI, so I used onready ...
0
votes
1answer
42 views

Select a block of tiles from tilemap by click and dragging

I'm creating my first game in Godot 3.1, a top-down 2D sim game where you can build rooms on a space station. I am using a tileset I created inside a TileMap node. I placed a script inside the node ...
0
votes
1answer
105 views

Creating object in front of player, with some distance

I want to create objects in front of player with some distance, so that prevents hit with player immediately. So first, I get the global player position and direction vector which player towards: <...
1
vote
1answer
17 views

Disconnect signal that connected from script

I connected signal when a scene is instantiated. ...
1
vote
1answer
38 views

Change object's location at instantiated moment

I'm trying to instantiate object(scene) and set it's spawn position at the spawn time. Here's the code I wrote: ...
0
votes
1answer
25 views

KinematicBody returns null to try get collided Rigidbody

Player is a KinematicBody and enemy is a Rigidbody. I'm using move_and_slide() to move player. When they collided, each both push them opposite direction, so it seems like physics stuffs working, ...
3
votes
1answer
141 views

No AA support in Godot 3.1?

I'm using Godot 3.1.1 and just realized that there is no available AA options. According to some post, Godot 2 supports FXAA, but some reason it's took out from 3. So I try to get FXAA for Godot 3.1, ...
0
votes
1answer
29 views

After rotated by Z-axis, X/Y axis still rotating just like z is 0

I'm making aerial vehicle controller, which can rotate 3 axis: X(Pitch), Y(Yaw), Z(Roll). Rotating x(pitch) and y(yaw) axis works fine, however after I rotated z(Roll) axis, x/y rotation gave me ...
0
votes
1answer
28 views

Updating RigidBody rotation and velocity only updates it's rotation

I'm currently making spaceship controller script. Control is simple, W/S to move forward/backward, A/D/ to rotate ship by Y Axis(yaw). Spaceship is RigidBody node and has CollisionShape as children. ...
0
votes
1answer
21 views

Changing node's translation affects to sibling node

I have a node which looks like this tree: FPSController (Root node, and it's KinematicBody) CollisionShape Camera GroundCheckRayCast When I moved CollisionShape's location down, camera also going ...
0
votes
1answer
31 views

RayCast node always return null

I'm using RayCast node to check the object is grounded. Here's the setting: RayCast node is placed near by ground and the length enough to collide with ground. Also RayCast node is enabled. RayCast ...
0
votes
1answer
40 views

Get project's gravity value in Godot

I need to get access project's gravity value which set in Project Settings -> Physics -> 3D -> Gravity, however I couldn't find any related information about this. How do I get project's gravity ...
1
vote
1answer
57 views

I cannot move my player to right on Godot

I'm beginning with Godot making a simple Sprite which should move both left and right but when right key is pressed the KinematicBody2D doesn't move right. ...
0
votes
0answers
18 views

Add touch screen support to tile navigation

I saw this awesome tutorial that is related to Grid-based Movement in Godot What I want is to add touch screen support for this kind of movement i.e. with virtual on screen joystick or gestures. How ...
0
votes
2answers
133 views

How to use Animation Player in Godot like Animated Sprite

So currently I am using the following code to play my sprites (AnimatedSprite Node). $Sprite.play("Animation Name") However now I want to use the AnimationPlayer ...
0
votes
1answer
103 views

Godot: how to use _draw to draw textures at an angle

So simple question that I just can't find an answer to, how do I use Godot's _draw function to draw textures rotated at an angle (more specifically how do I get them turned completely 90° onto their ...
0
votes
1answer
65 views

Godot Animation only playing First Frame

I have tried checking if it is already playing, stopping animations before and putting it in a separate function. Whenever I jump it should play 4 Frames of my animated sprite. But it only plays first....
1
vote
1answer
69 views

How can I create a patch of ocean that blends seamlessly into the horizon?

The tagline pretty much says it, but here's a picture to show the problem: The darker gradient of blue on the horizon comes from the Godot WorldEnvironment, while the lighter shade results from a ...
0
votes
1answer
75 views

In Godot, how to make a Kinematic body affectable by rigid bodies?

Background Info I'm currently following the FPS tutorial from the official site. By the end of Part 1, there is a Player object implemented as a KinematicBody and ...
0
votes
1answer
20 views

CenterContainer makes my button too small

I get the perfect width for my buttons, but CenterContainer overrides that value of theirs to make the button as wide as the biggest text length of the buttons when I put the buttons inside of the ...
0
votes
0answers
33 views

In godot, how could I make an explosion not destroy occluded terrain?

This game is in 2D, and is made out of blocks. Normally, I would simply erase blocks that aren't indestructible and are within range of the explosion. However, if blocks are behind something ...
1
vote
1answer
123 views

Lagging problem with chunk creation in Godot

We are developing a 2D game in Godot and we are stuck while trying to divide the map in chunks. Namely, the scene is a forest, where trees spawn positions were generated by noise: since the trees are ...
0
votes
0answers
33 views

Godot calling function twice

So I had a node with area_2d enemies. When a player hits any of the enemies, the on_enemy_area_entered signal calls the game over function which adds the coins ...
2
votes
1answer
62 views

Godot and getting files via HTTP

So, I am wanting to use Godot to get a (binary) file using HTTP and then either save it or, even better, turn it into a Resource in memory that I can use. It'll be WAV files that I'm getting in ...
0
votes
0answers
65 views

Shader: displacement map to the all screen?

I want to recreate this effect shown here So I tried recreating this shader from shadertoy in Godot: This is the my translation in Godot Shading language of the first shader I linked: ...
0
votes
1answer
63 views

How can I move and rotate an object along with another using vector math?

How can I move and rotate an object along with another using vector math? This is using Godot 3.1 using a KinematicBody2D as a ship with a ...