Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
5 votes
1 answer
3k views

How do I make a collision between AABBs slide?

I have a room with objects inside. Each object has it's own AABB. I know how to check for collisions between the objects with an AABB-AABB intersection. How do I calculate an appropriate collision ...
PeeS's user avatar
  • 475
1 vote
2 answers
4k views

Breakout collision using 2D Rectangles?

Here is my code: ...
Javier's user avatar
  • 31
6 votes
5 answers
2k views

Need some advice regarding collision detection with the sprite changing its width and height

So I'm messing around with collision detection in my tile-based game and everything works fine and dandy using this method. However, now I am trying to implement sprite sheets so my character can have ...
Frank Scott's user avatar
4 votes
1 answer
854 views

Character jittering with this tile based collision code

I have been trying to get my collision code working for hours now but with every resource I have tried my character still jitters. First I tried using the platformer sample but my character still ...
Frank Scott's user avatar
5 votes
2 answers
3k views

How do I resolve a collision of a rectangle with two rectangular tiles at once?

I am having some problems with collision detection between a player and the environment in a tile-based game. I have a player objects, Tiles and what I call ...
Androme's user avatar
  • 81
11 votes
2 answers
6k views

Microsoft XNA Platformer Example, is the Collsion Detection implemented accurately?

The example provided by Microsoft seems as if the collision detection (from what I can see) will have a small error. When the user collides with an Unpassable tile, the depth of the intersection is ...
PriestVallon's user avatar
1 vote
1 answer
448 views

Why does my 2d collision and movement not work properly?

I'm trying to write(in c++ using sdl) a mario like game as in a tile based world with by pixel movement for the character and I've run into some problems I cannot seem to find the source of: 1.The ...
tuby's user avatar
  • 11
2 votes
1 answer
491 views

Box 2d and really complex big shapes

I intended to use jbox2d for my project. But as I went deeper into it's manual I'd found out that it supports dynamic objects between 0.1 and 10 meters (if use scaling and assume that 0.1 is smallest ...
23k's user avatar
  • 191
4 votes
1 answer
784 views

How do I avoid causing more collisions, when resolving multiple AABB collisions?

I have a lot of AABB bouncing on the screen. Doing collision/response between 2 AABB is fairly easy, but how do you handle this when you can be pulling AABB's apart but making them getting into ...
Notbad's user avatar
  • 1,095
0 votes
1 answer
538 views

How can I determine which direction a 2D collision is occurring from?

The problem is as follows: Think 2D Zelda (Links Awakening, A Link to the Past) style movement where you can run into walls from any of the four cardinal directions, or basically up, down, left, and ...
SpartanDonut's user avatar
  • 2,937
3 votes
1 answer
856 views

How are collision and collision callback systems usually implemented?

I'm writing my own game engine for learning purposes and was wondering about common ways to handle collision callbacks/responses. I'm NOT looking for ways to resolve collisions (no math needed here), ...
you786's user avatar
  • 645
5 votes
3 answers
438 views

Creating an unbiased deterministic collision resolution order

I'm working on a game with a replay system, so I need the game logic to be deterministic. A part of this is collision detection and I'm having a bit of a conceptual problem here. (I'm programming in ...
noio's user avatar
  • 247
9 votes
2 answers
6k views

How to resolve penetration of two colliding bodies

I've implemented simple 3D game physics engine. I already have decent collision detection in place, now I'm trying to figure out the collision response part. I'm using impulse based method to ...
adam's user avatar
  • 191
2 votes
1 answer
2k views

2D platformer multiple rectangle collision cause jitter

I posted this question two weeks ago: 2D platformer corner collision and I implemented NoobsArePeople2's solution. Problem is, when player intersects two rectangles that are inside each other, he ...
isklenar's user avatar
  • 145
5 votes
4 answers
11k views

Ball collisions 'sticking' together

I have a program which simulates many bouncing balls. The balls can bounce off each other and off the sides of the container. The problem I am having is that sometimes when two balls collide, they ...
james's user avatar
  • 127
2 votes
1 answer
2k views

How to resolve concurrent ramp collisions in 2d platformer?

A bit about the physics engine: Bodies are all rectangles. Bodies are sorted at the beginning of every update loop based on the body-in-motion's horizontal and vertical velocity (to avoid sticky walls/...
Shaun Inman's user avatar
11 votes
3 answers
2k views

How to separate colliding objects without creating more collisions

Suppose I use a simple discrete collision detection system where I move all objects then check for collisions. I want any colliding objects to be separated (of course) and assigned appropriate ...
AJM's user avatar
  • 397
4 votes
3 answers
7k views

How can I determine the velocity after impact of a 2D ball collision?

Consider two balls moving towards each other. Each has a given mass and velocity. Assuming the balls collide, how can you determine what direction the balls will take afterwards? (taking into ...
james's user avatar
  • 127
23 votes
4 answers
11k views

How to deal with corner collisions in 2D?

I'm writing a top down 2d XNA game. Since its my first I'm trying to write the physics and collision stuff myself to learn it. Whenever my player sprite character attempts to move into a position ...
TerryB's user avatar
  • 1,273
3 votes
1 answer
282 views

Collision Managers and bitmaps

I am rewriting a game I made to use a (custom) collision manager that uses the minimum displacement method. As of now, my simple manager can only recognize and act on a couple of shapes - Circles and ...
you786's user avatar
  • 645
6 votes
2 answers
3k views

Handling collisions with ground

How do you usually solve collisions between entities and the ground? Sending collision events hardly seems appropriate since almost everything touches the ground at almost all points in time. Calling ...
Paul Manta's user avatar
  • 3,177
15 votes
3 answers
15k views

Collision resolution in case of collision with multiple objects

I have static objects and movable objects. The collisions are detected using the separating-axis-theorem. For example, in this situation I have two static objects (in red): and a movable object ...
TravisG's user avatar
  • 4,402
6 votes
4 answers
6k views

How do I restrict the movement of a point to within a radius of another?

I have a situation where a sprite's center point needs to be constrained within a certain boundary in 2D space. The boundary is circular, so the sprite is constrained within a radius. This radius is ...
Phil's user avatar
  • 898
15 votes
4 answers
4k views

How do I calculate rotation caused by bounce friction?

Following on from my previous question: I have the ball quite realistically bouncing from surfaces it hits. Now I'd like to make it spin from the friction of the hit. Showing this is simple enough: I ...
codemonkey's user avatar

1
5 6 7 8
9