All Questions
Tagged with godot collision-detection
29
questions
5
votes
2
answers
3k
views
How can I get the specific tile in a collision with a Tilemap?
I am developing a simple platformer, I have three types of tiles right now:
Floor: does nothing on collision.
Bad: makes the player lose the game.
Good: makes the player beat the game.
I am trying ...
4
votes
1
answer
3k
views
Does collision between two Area2D work differently than collision with Rigidbody2D?
Consider a Main.tscn with:
(1) a player:
+ Player extends Area2D
|_ AnimatedSprite
|_ CollisionShape2D
The player has:
...
3
votes
2
answers
1k
views
How to differentiate between enemy and something else in Godot?
So, I have a simple 3D game with a player, an enemy, and walls. I've figured out how to detect collisions between my player (RigidBody) and an enemy or wall (Static Body). I want to know how can I ...
3
votes
1
answer
1k
views
Equivalent of RigidBody2D's body_exited on StaticBody2D?
I'm building a type of Pinball game using Godot 4.0. I've got two types of components relevant to this question:
balls, represented as a RigidBody2D scene with <...
2
votes
1
answer
2k
views
Godot: is_on_floor always false
This is an extremely simple game (following tutorial).
My code and configuration allows the actor object to fall on a platform made of tilemaps and not fall through, but the function is_on_floor() ...
2
votes
1
answer
709
views
How can I keep a node in-place while I re-parent it?
I have an object that needs to follow various Path2D paths in my scene. To do this, when it needs to follow a path, I re-parent it to a ...
1
vote
1
answer
455
views
Increment score when player touches a coin's Area2D
I have created and finished my game in Godot, but I want to add a scoring system. Specifically, I want the score to increase by 1 every time the player touches a coin. However, I am not sure how to ...
1
vote
1
answer
442
views
Area2D only detecting body_exited once
I am new to game development, I am practicing by creating a pong game.
I currently have an Area2D set up with a signal listening for ...
1
vote
1
answer
203
views
Godot 3.2 Bomb explosion doesn't affect player or npc
I finished the Godot 2D game tutorial Dodge the Creeps, and i'm adding a few additional features to reinforce the things learned and make more interesting the base game.
Basically i added a Scene ...
1
vote
1
answer
290
views
Detect intersections between an `AABB` and a `CollisionShape3D`
I thought this would be a simple matter of getting the mesh that defines the CollisionShape3D and checking if any of the triangles of the mesh intersect with the <...
1
vote
1
answer
239
views
How to make collisionshape2D work from other scene in Godot?
I have created a scene which contains Area2D, CollisionShape2D & AnimatedSprite. Then I ...
1
vote
1
answer
96
views
Bullet not colliding with either plane or drone
i made a godot game in which theres a player and a drone, I got the shooting to work but when i tried to make it so that the bullet attacks the drone/player, it wasnt working properly. Basically i ...
1
vote
1
answer
3k
views
Why is Area2D not detecting collisions?
I am making a sidescrolling shooter and I am working on the shooting mechanism.
I have two scenes, one contains a KinematicBody2D with a Sprite, position2D and a collisionshape2D and a second ...
1
vote
1
answer
370
views
How to compute the points of a CollisionPolygon2D?
Godot v3.3.1.stable.mono.official
I am trying to draw a CollisionPolygon2D programmatically but I cannot resize or write the ...
1
vote
1
answer
96
views
How to transfrom CollisionPolygon2D according to the Vertex Shader applied to a Sprite?
Consider this:
* KinematicBody2D
- * Sprite
- * CollisionPolygon2D
And a vertex shader:
...