Skip to main content

Questions tagged [collision-detection]

Collision detection is the determination of whether or not two or more entities make contact with each other during gameplay.

Filter by
Sorted by
Tagged with
0 votes
1 answer
48 views

Chain cutting swipe input skips over chains

I have a game where you need to cut chains, similar to Cut The Rope. I want to develop it for Android, so I need mobile controls. For detecting swipes I used ...
CheckerT's user avatar
0 votes
0 answers
56 views

bad position of contact points :why?

...
kaloprat's user avatar
  • 111
0 votes
0 answers
22 views

Collision manifold between shapes

I am implementing the narrow phase collision detection of a 2d physics engine. The narrow phase takes a list of shape pairs: [(s1, s2), (s2, s5), ...] And for each ...
Eilan Laken's user avatar
0 votes
1 answer
40 views

Object collision and vector reflection for complex polygons?

I am currently creating an environment to train aim-bot AI's for my game. It is a 2d world made of complex polygons, and the goal is to have the AI's shoot ricocheting bullets. Using a ray-casting ...
Beluker's user avatar
0 votes
1 answer
50 views

AABB Collision Resolution Per Face

I have this function that detect the collision of two AABBs: ...
Scollier's user avatar
  • 124
1 vote
2 answers
65 views

Representing a concave polygon as a hull "minus" convex cavities

I am implementing 2D collision detection, and trying to tackle the problem of concave polygon vs. shape. The SAT works only for convex shapes. I was wondering if the following approach is a viable ...
Eilan Laken's user avatar
0 votes
0 answers
26 views

Collision glitches when player runs into side of a wall

I am coding a game for fun, and I am trying to implement collision; specifically, I want the player to be able to move to the side even when ramming into a wall diagonally (I had this problem before, ...
Tiimzy's user avatar
  • 133
2 votes
1 answer
60 views

How to set up high-performance collisions for level geometry in Unity?

I'm new to Unity. I was wondering what the best workflows were for placing colliders. I'm going for high performance, and I've heard that mesh colliders aren't as performant as just placing down box ...
Taylor Goeman's user avatar
1 vote
1 answer
50 views

Player not sliding on the side of a wall when two keys are pressed

I am making a game right now, and I am working on collision for different Rect walls (all of their data is stored in a list). It works great, except for one problem:...
Tiimzy's user avatar
  • 133
0 votes
0 answers
20 views

delta_time with the new move_and_collide() function in GameMaker

Is this implementation of delta time in recent Game Maker reliable? var dt = delta_time / 1000000 move_and_collide(spd_h * dt, spd_v * dt,obj_world.solid_tiles); ...
Bernardo Becker's user avatar
0 votes
3 answers
54 views

Reduce processing time of image to shape

I'm making a simple game engine using Java and have found a major issue. To create accurate collision detection I decided to convert a transparent image into a ...
Grinding For Reputation's user avatar
0 votes
0 answers
30 views

Collision between a sprite and a rect in PyGame

I'm trying to make a simple platformer game, which has code to move the camera towards a player as they jump around. Now I have two classes: one for the player, and one for the platform. In the ...
Divyansh undley's user avatar
0 votes
2 answers
54 views

How to check if an AABB is colliding or the mesh itself

I have the following problem. I would like to check in bullet whether only the AABB collides or the mesh collider itself. Unfortunately I can't find out how to do this Within the screenshot you can ...
Andy's user avatar
  • 13
0 votes
0 answers
65 views

Enemies not registering hits from the player in Godot

I am making a 2D game where the player can attack enemies using a designated Area2D node as an attack area. I set up signals to manage attack phases and ensure ...
buzzbuzz20xx's user avatar
1 vote
1 answer
59 views

Issue with AttackArea Monitoring Before Attack in Godot 2D Game

I'm developing a 2D game where the player character can attack enemies using a designated attack area (Area2D node named AttackArea). I've encountered a problem where the AttackArea is active and ...
buzzbuzz20xx's user avatar
0 votes
2 answers
62 views

How to implement rigidBody movement and collision in local axis X while moving the body automatically in local Z axis?

I'm making a very peculiar outrun clone. I need the player to move forward automatically while being able to change his position on the road in his local X axis. I made infinitely generated road and ...
NationalGeographicProgrammer's user avatar
0 votes
1 answer
59 views

Particle system won't collide with box collider all the time. Rain seeps through ceiling

I'm trying to make it rain in my game, but am having a problem with it seeping through the ceiling. I put a box collider above the house to catch the rain as it falls and it worked for a while, but ...
WestMansionHero's user avatar
0 votes
1 answer
51 views

How to add gameTime to movement with acceleration and diagonal normalization?

I recently started rewriting my engine from scratch, because the old one was my first attempt and the structure was very messy. Everything has been going great, but now I'm being held back by some ...
Markus Vaittinen's user avatar
1 vote
0 answers
61 views

Swept AABB for 3d collisions

https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/swept-aabb-collision-detection-and-response-r3084/ So I was following the tutorial above to implement swept aabb for ...
Kevin Chen's user avatar
0 votes
0 answers
46 views

How to align to 2D ground surface directly underneath?

I'm out of ideas at this point. I'm trying to set up a function inside my player controller that aligns the player with whatever is under it (usually the ground), ive tried using Raycasts, collisions ...
Pow's user avatar
  • 393
0 votes
0 answers
68 views

SAT-based collision resolution in case of edge-to-edge collision

I am trying to implement a SAT-based collision detection and collision resolution system. Collision detection seems to be working correctly, but collision resolution behaves weirdly when there is edge-...
cyb3rc001's user avatar
0 votes
1 answer
41 views

How to check for collisions between objects with the same script?

I am creating a game where there would be two objects instantiated. Each one has a script (to check for collisions), a Rigidbody2D component and a ...
Saharsh's user avatar
0 votes
1 answer
56 views

Identifying the wall of impact during BSP traversal

I'm building a 2D BSP based physics game and am having trouble implementing what might seem like an easy feature. I'm using Gamemaker as the basis for this project. Basic Info and Point of Impact ...
blondie's user avatar
  • 11
0 votes
0 answers
45 views

Collision matrix is set to have no interaction between layers, but collider still triggers

I wanted to set up the layers that my Player interacts with, but it still triggers with unwanted layers. I have disabled the whole collision matrix in project settings: Here's my Player settings: ...
Argamidon's user avatar
  • 101
0 votes
1 answer
251 views

Detect collisions with both parent and child nodes in Godot

Using Godot 4.2.1, I have a 3D scene with a CharacterBody3D as the root. It has two children; a child CollisionShape3D, and a child CharacterBody3D with its own collision shape. ...
devil0150's user avatar
  • 123
0 votes
0 answers
42 views

Differentiate between Triggers in OnTriggerEnter Unity

I want to implement a simple functionality in my Unity application: I have a water volume represented by a Tilemap with TilemapCollider2D. I have a player that has 2 triggers: 1 in the center of the ...
Arial Pilisov's user avatar
0 votes
1 answer
62 views

Bounding Box/Rectangle collision glitches

I've been working on this golf game for a couple of weeks and have been trying to create a reliable collision system for whenever a golf ball (mini golf) hits a block. I'm using regular rectangular ...
Jet's user avatar
  • 1
0 votes
0 answers
73 views

Pixel platformer character collides with blocks above while there's still a visible gap

I was trying to the set up a tile map for a 2D pixel art game in Godot 4.1 (following a tutorial) and realized that there seems to be an issue or something I am not aware of with the way collisions ...
JAL's user avatar
  • 1
0 votes
0 answers
52 views

Managing multiple collisions in a single frame

I have a object with box collider that spins 360 degrees before destroying itself. I have a lot of enemies spawning around the player. The object spawns, spins and destroys itself. Imagine it like ...
shriram's user avatar
1 vote
0 answers
52 views

Separating axis theorem implementation results in limitless extending colliders along the Z axis

I am trying to implement SAT and it works except for the fact that colliders extend infinitely along the Z axis and I can never get past them. I also have confirmed that ...
Jakob Tadej Vrtačnik's user avatar
0 votes
1 answer
45 views

OnCollisionStay outputs strange contactpoints

I am currently trying to make a pen draw on a paint. I am searching for contact points on the paint but there is too much contact points than expected. I'm not sure to properly understand how ...
Hazard4U's user avatar
1 vote
0 answers
39 views

How to fix collision for objects beyond their green lines?

As you can see in the image those are collision lines but its kinda of disingenuous as there are I would say invisible collision blocks on the X's, I tried messing around with the sorting layers and ...
Thecodingnoob's user avatar
1 vote
1 answer
382 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 ...
zeroparity's user avatar
0 votes
1 answer
162 views

Test if a point is inside a 3D cuboid, given the 8 corner positions, through code

I'm trying to find to obtain if a point, let's call it "v" is inside a cuboid which every corner position named P1 to P8 I am trying to achieve this and in fact found some answers in some ...
user57129's user avatar
  • 121
0 votes
1 answer
252 views

How can I change scenes when the player touches another CollisionShape2D in Godot 3.5?

I need to know how I can change scenes in Godot 3.5 when the player touches another CollisionShape2D. I've tried this: ...
shadowxstrike's user avatar
0 votes
1 answer
126 views

How can I make colliders-only visible in Godot?

Specifically, I'm looking for any way to see a collision-only item from a Mesh Library in a GridMap. (The tag says "tile map", which it technically isn't; but there's no option for a grid ...
Michael Macha's user avatar
0 votes
0 answers
94 views

Brick Breaker - Adjust ball's collision angle without affecting speed

I'm working on a Java Brick Breaker game, and it's functional so far. However, I'm facing an issue with collisions. Currently, when the ball collides it simply reverses its direction. I want to ...
Zappiermike's user avatar
0 votes
2 answers
102 views

How does unity refer a to a normal when there are so many?

When an object collides with another object, does unity calculate the normal, or return it from the list of normals?
Nato's user avatar
  • 9
0 votes
2 answers
62 views

How do I detect a hit by a swung held object?

I have an XR Grab Interactable wrench and the grab is working fine, as is movement. I'd like to use it to smash some chains, so I figured that I could use an OnCollisionEnter on the chains, and check ...
Sean Duggan's user avatar
0 votes
2 answers
96 views

Detecting collisions with trajectories

What if an object were to have collision detection implemented as so: A ray in the direction the object is moving in, and a ray in the direction of gravity.
Nato's user avatar
  • 9
0 votes
1 answer
120 views

Why check the ball and brick collision twice?

I watched https://www.youtube.com/watch?v=F86edI_EF3s. I believe the following code is the complete code https://github.com/games50/breakout/tree/master/breakout13 And https://github.com/games50/...
shingo.nakanishi's user avatar
0 votes
0 answers
18 views

Does unity transform world to local considering rotation

I want to implement oriented collision in unity as a test, and for convenience I just wanted to know if local space is also based on rotation. I wanted to check at least two objects against each other ...
Nato's user avatar
  • 9
0 votes
0 answers
79 views

How is terrain collision handled

GJK can be used for all shapes but what if the points in a figure aren't indexed, then how can we get the Minkowski space by adding the correct pairs of points even though we don't know them, and also ...
Nato's user avatar
  • 9
0 votes
1 answer
52 views

Why are the transform game objects moving away from the snail when they are swapping their direction?

I am making a game in which I created a character (main player) and another character(snail). Now the snail will move on the ground, when there is no ground detected it will change its direction. I ...
gamePlay's user avatar
0 votes
1 answer
18 views

Change of computing power/ time needed when imported Mesh triangle number changes

I am doing a Unity project, that makes it necessary to import a mesh consisting of triangles. As it is possible to reduce the amount of triangles in a mesh and keeping the structure similar, I am ...
the2second's user avatar
0 votes
1 answer
104 views

Time aware point -> capsule swept collision detection?

the simplicity of Minkowski sums are one of the big reasons capsules are used in collision detection, especially for player models. One of the benefits of this should be the ability to perform ...
Krupip's user avatar
  • 1,763
0 votes
0 answers
60 views

Decrease size of hitboxes for a sprite in PixelPAD

I need to make the hitboxes of spikes smaller, so that it's not impossible for the player to get through. How do I do that?
CK Development's user avatar
2 votes
1 answer
298 views

Character controller that can handle sloped terrain and boxy ledge traversal

I am working on a character controller for a 3D platformer in Unity. I cannot find an approach that satisfies me. I have experimented with these approaches in order to learn about their virtues and ...
DyingIsFun's user avatar
  • 1,307
0 votes
0 answers
33 views

Casting out vision rays for 2D car in pyglet to return distance from objects?

I am working on a machine learning project that involves training a 2D car to drive around a top-down racing track. I'll be training neural networks using different algorithms and one essential form ...
Silvy's user avatar
  • 1
0 votes
0 answers
39 views

how to get all points contained in the area of an object of any shape

how would I get points contained by objects, so that I can check for intersections of points, and I also ask myself if checking for intersections each frame would be too CPU intensive?
Nathan Francisco-Ribeiro's user avatar

1
2 3 4 5
50