Skip to main content

Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
1 vote
0 answers
76 views

the vines in animal well display pixel perfect deformation when the pc moves through them. they also display rope physics but do not appear to be implemented by jointed segments of physics rigidbodies ...
mortsini's user avatar
7 votes
1 answer
1k views

Suppose you have two overlapping spheres \$A\$ and \$B\$, with centers \$c_{A}\$ and \$c_{B}\$ and radii \$r_{A}\$ and \$r_{B}\$. Let \$n = \operatorname{normalize}(c_{B} - c_{A})\$ be the collision ...
Ram's user avatar
  • 73
1 vote
1 answer
217 views

I'm reworking physics in a 2d action platformer I'm developing (no engine, c++ / sdl). Here's the general movement logic for all characters: I calculate the offset I need to apply to the character I ...
SavedowW's user avatar
3 votes
0 answers
60 views

How do I deal with collisions that have small relative velocities, but external forces such as gravity? Imagine a scenario with a box in 2D, rotated 30 degrees, and placed on the ground. Gravity acts ...
Nick Gallagher's user avatar
0 votes
1 answer
68 views

In my collision protocol when a hit is found I’m using AABB faces to determine a reflected direction where the mobile must move (see picture left). This is easy as we just need to invert the sign of ...
philB's user avatar
  • 333
1 vote
1 answer
116 views

I'm trying to implement a PGS solver for collision response, but I'm currently stuck. How the problem manifests is, for the example of a box resting on the ground, if the box is given a small rotation ...
Zoler1337's user avatar
1 vote
0 answers
122 views

CONTEXT: I am implementing a basic 3D character controller from scratch in Unity. For collisions, I do a capsule cast in the direction of the player velocity and use the collide and slide algorithm to ...
Numdoo's user avatar
  • 11
1 vote
1 answer
117 views

I have a 2D circle, defined from: c = circle(position = (x,y), radius = r) I also have a 2D rectangle defined from ...
nammerkage's user avatar
1 vote
1 answer
91 views

I've just started getting into 2D game development and have been experimenting with some 2D collision and correction logic in canvas. I'm trying to debug this block of code and understand why it is ...
Jacob Goldstein's user avatar
0 votes
1 answer
96 views

I've written two main functions who's purpose is to detect and resolve collisions between a moving rectangle and a non-moving rectangle. I have a decent understanding of how the algorithm works, and ...
Vonkswalgo's user avatar
0 votes
0 answers
98 views

I'm trying to create a particle simulation (solar system kind). Until now my particles have no spin so the collision is rather simple ...
S M's user avatar
  • 101
0 votes
0 answers
74 views

I'm making a game prototype in Godot. My player character is a ship that moves around in 3D space without gravity. I have some simple code that adds a knock back force to the player on collisions ...
Zoford's user avatar
  • 1
1 vote
0 answers
75 views

I'm coding a 2d physics engine in python, and I'm struggling to understand the right way to implement collision resolution when there are multiple contact points. Consider a very simple collision case ...
snickerdoodles777's user avatar
0 votes
0 answers
109 views

What methods should be used to create such a sphere in UNITY? This collider seems to deform in real-time, squeezing and monitoring collision information when the sphere collides. I cannot achieve this ...
asd's user avatar
  • 1
0 votes
1 answer
153 views

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
0 answers
109 views

I have this function that detect the collision of two AABBs: ...
Scollier's user avatar
  • 124
0 votes
1 answer
98 views

I am working a 2d physics engine. Polygon to polygon collision and velocity resolution works without issue, but I am struggling to get working circle to circle and circle to polygon velocity working ...
TrippR's user avatar
  • 103
2 votes
0 answers
148 views

Here two objects collide and I use impulse to calculate the velocity after the collision. But because there are two objects, there are two normals. Calculating impulse only requires one normal. My ...
noodle_run's user avatar
0 votes
0 answers
108 views

Will it allow for making actual wheels, gears and roller coasters?
ivan866's user avatar
  • 141
0 votes
2 answers
145 views

Currently trying to make a 2D game in Unity and I'm trying to make the part where if the character falls in a hole it goes back to spawn, but I currently have a ground box collider blocking it, which ...
TheEpikDuck's user avatar
0 votes
1 answer
167 views

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
1 answer
130 views

I've implemented a collision resolution system based on Ian Mellington's System Cyclone and afterwards based on the Game Physics Cookbook. Currently the last one is implemented. For some reason the ...
Martin's user avatar
  • 1
1 vote
0 answers
78 views

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
2 answers
157 views

I am making a 2D game where balls bounce from the edges of the screen, However, there seem to be two types of issues with this kind of bounce method, and every tutorial I checked uses the same method. ...
ZozeR's user avatar
  • 42
3 votes
1 answer
366 views

I am trying to replicate Mario Maker's On/Off switches in Godot 4.1. In my current version, if the player got stuck inside the block after it was toggled on, the player just teleports out it. I know ...
Jason O'Neil's user avatar
0 votes
1 answer
183 views

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
4 votes
1 answer
1k views

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,337
0 votes
1 answer
147 views

I'm following this guide to implementing collisions in 2D physics. It shows this diagram, but I don't understand how to calculate the values of Da and ...
noodle_run's user avatar
1 vote
1 answer
92 views

I am currently developing a simple Super Mario Bros. like platformer in Cocos2d-x v2. I am now at the step of doing wall sliding with two axis-aligned bounding boxes (tiles) but I've not quite found ...
MikaKC's user avatar
  • 11
1 vote
0 answers
163 views

I'm currently working on my first Unity Learn code challenge, making a Flappy Bird style game where a plane needs to fly through gaps between wall obstacles. I've successfully implemented all the ...
Mila Data's user avatar
0 votes
1 answer
76 views

I'm trying to make a game where the player has to destroy blocks. But when the player collides with the corners of the blocks, the player's velocity slows down, or even stops. How can I ignore the ...
Smizzles's user avatar
0 votes
1 answer
125 views

I'm trying to create a 2D "board game" type thing in Unity, and I would like each player to be visible within the same space. The way I want to do that is by having it so when a player ...
Konxovar's user avatar
0 votes
0 answers
75 views

I'm trying to write a common 2D game and using vectors for physics. I have 1 wall and 1 player object that can move diagonally (both are squares without rotation). When the player object collides with ...
ZAK's user avatar
  • 1
1 vote
1 answer
435 views

For context, I have a player that can use a bow or a spear to shoot enemies in a 2D side scroller game. The bow shoots arrows and the spear shoots itself, and they both have rigidbody2Ds attached. ...
Peecee's user avatar
  • 13
0 votes
0 answers
176 views

I have spent hours on this task and I feel it's high time I asked. My avatar hands go into my chair GameObject. I added a box collider to the hands of my avatar and unchecked "Is Trigger". I ...
Craving_gold's user avatar
1 vote
2 answers
177 views

I am trying to simulate the behaviour of a rigid body, for example a cube, while it settles on a flat surface. Let's say it lends on an edge or even on a corner, and now it has to settle and remain on ...
Žarko Tomičić's user avatar
0 votes
0 answers
99 views

I am trying to simulate what happens when a cube hits the floor after free fall. I am considering a situation in which cube hits the floor with its edge. There is obviously reaction force from the ...
Žarko Tomičić's user avatar
1 vote
1 answer
399 views

How will I calculate the direction of the circles when they hit each other? (there is no change in speed, there is no mass, and all circles have the same radius) ...
dechire's user avatar
  • 13
0 votes
1 answer
547 views

I've been trying to figure this out for weeks but every resource only provides answers for a single body. As far as I can tell for a single body you Find the time of impact Step up to that time ...
gjh33's user avatar
  • 1
0 votes
0 answers
117 views

I have a problem with Box2D when 2 dynamic bodies fall onto a static body located below when their restitution is non-zero. They tunnel through each other instead of a rigid elastic bounce. If I treat ...
Simon Zvara's user avatar
0 votes
1 answer
433 views

I'm in the process of creating a game using electron and HTML5. It's going to be a pretty basic story-based platformer, but I'm ...
Blue Herring's user avatar
15 votes
4 answers
3k views

I'm having some trouble solving collisions in obtuse interior corners. In the above image, the black circle is the initial position, the red is the projected movement (straight into the corner), the ...
IanLarson's user avatar
  • 811
0 votes
0 answers
342 views

I have a rigid body with a sphere as a collision mesh which can move and rotate freely. It realistically spins when colliding with other objects, but this is annoying from a gameplay standpoint. Is ...
Mazz1224's user avatar
3 votes
1 answer
218 views

I have a perfect 2D system, with no friction, elasticity, etc. A ball is colliding with a rectangle. I know the angle of the motion of the ball in degrees. I want to figure out how said angle will ...
user avatar
2 votes
1 answer
439 views

In Godot, when a 2D rigid body collides with another body, it seems that the force is absorbed/used to bounce back, but it doesn't give an "angular impulse" to the object, for instance if a ...
Pop Flamingo's user avatar
1 vote
1 answer
914 views

Is there a cheap and effective way to get the closest point on an SDF? (signed distance field). CodeParade made a video on a game he developed that uses SDF collisions with a sphere, how did he do it? ...
Creeper Cloud's user avatar
0 votes
1 answer
741 views

I'm developing a game in which bot-controlled billboards pursue you. If the bot gets stuck behind a wall for a while, not able to catch the player, I want the bot to pass through the wall. I'm using a ...
silver takana's user avatar
0 votes
2 answers
375 views

Context I'm here today to figure out how can I have an object to fall down after colliding to another object. In my case, I'm remaking Flappy Bird and trying to reapply some of the physics in place ...
Zeid Tisnes's user avatar
1 vote
0 answers
20 views

I need an idea, please :). I've implemented moving AABB -> AABB collision detection (3D), returning the time of impact. When I calculate time_of_impact * velocity...
Aitch's user avatar
  • 111
0 votes
0 answers
67 views

Is there a common practice for resolving polygon/polygon collision by sliding as shown in the image? The moving polygon is convex (and if it makes it any easier, a quadrilateral), but the polygons it ...
IanLarson's user avatar
  • 811

1
2 3 4 5
9