A process of adjusting game objects position after collision.

learn more… | top users | synonyms

3
votes
1answer
1k views

Resultant Vector Algorithm for 2D Collisions

I am making a Pong based game where a puck hits a paddle and bounces off. Both the puck and the paddles are Circles. I came up with an algorithm to calculate the resultant vector of the puck once it ...
3
votes
1answer
555 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), ...
3
votes
1answer
230 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 ...
3
votes
1answer
145 views

How do you get the collision plane when using AABBs? [duplicate]

My collision detection initially seemed to work well enough, but my answer to this question shows that I have went with SAT testing now instead. My goal was to find the plane at which to slide the ...
3
votes
3answers
1k views

Circle-Rectangle collision resolution

I have a non axis aligned rectangle, like a car, in my game. I have to check and resolve the collision between the rectangle and circle, which is stationary. I have found lots of ways to determine ...
2
votes
1answer
225 views

How do I avoid pathfinding characters getting stuck in corners?

I used A* pathfinding to return a list of Tiles to get from an enemy to the player. After that, I wasn't sure how to actually move the enemy. What I ended up doing was get the first Tile in the path. ...
2
votes
3answers
194 views

Determining which edge a collision occurred on in a platformer

First of all, this will be Open Source, and you will be mentioned for the help. We've been programming a Super Mario Remake for the iPhone with Cocos2d for school. It looks pretty great, and we ...
2
votes
1answer
139 views

Have the character automatically slide around obstacle corners [duplicate]

Like this: The player is only holding right, however the character still moves up a bit to go around an obstacle. My current collision system has access to: The entity's previous position The ...
2
votes
2answers
169 views

Typical collision detection

I would like to know how is the typical collision detection of most games. For example, you control a character which can move in 2 dimensional directions (except up and down). Now lets asume he walks ...
2
votes
3answers
240 views

Collision organization problems

I just started playing around with c++ and some SFML. I'm going to create a 2D game with top view to test my ability and I came across a very big problem: collision detection and physics. So I see at ...
2
votes
1answer
1k 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 ...
2
votes
2answers
153 views

Collision detection - make sure the player touches the object exactly

I know this is really something I should be able to figure out on my own, but a solution is evading me. Okay, here are a few relevant parts of my code. bool Game::Col(int x1,int y1,int w1,int h1, ...
2
votes
1answer
243 views

Get intersected volume of two planes in 3D

I'm working on AABB - AABB collision response and I'm having trouble figuring one part out. My situation is as follows (see image). I have a player AABB (blue) and an object which collides (brown). ...
2
votes
1answer
179 views

How can I resolve collisions at different speeds, depending on the direction?

I have, for all intents and purposes, a Triangle class that objects in my scene can collide with (In actuality, the right side of a parallelogram). My collision detection and resolution code works ...
2
votes
2answers
261 views

How should I do my collision response?

I'm making a small lockpicking simulator. Obviously I'll need the pick to not pass through the lock, and I'll need the pins to move when you tap or push them with the pick. Here's what I have so far, ...
2
votes
1answer
394 views

Collision detection between a bunch of AABB

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 ...
2
votes
1answer
125 views

How to calculate new velocities between resting objects (AABB) after accelerations?

lately I have been trying to create a 2D platformer engine in C++ with Direct2D. The problem I am currently having is getting objects that are resting against each other to interact correctly after ...
2
votes
1answer
225 views

Collision Resolution: How to avoid Interpenetration/Tunneling Caused by Prior Collision Handling? [duplicate]

My game processes world collisions followed by entity collisions. The problem here is that entities can break through walls the next frame when world checks are run again as a result of the prior ...
2
votes
1answer
517 views

How to calculate collision normal between two AxisAlignedBox's?

I'm writing a physics simulation in Ogre3D and I'm trying to figure out how to calculate the collision normal between two Ogre::AxisAlignedBox's. I am checking for collisions using the "intersects" ...
2
votes
1answer
230 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 ...
2
votes
1answer
1k 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 ...
1
vote
2answers
2k views

Breakout collision using 2D Rectangles?

Here is my code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; namespace BreakOut { class Field { public static ...
1
vote
2answers
206 views

How to resolve a collision at the border between two colliders?

I'm writing a simple non-physical one-circle-to-many-rectangles collision detector/resolver. For collision detection, I'm using a very common algorithm, and it's working pretty well. For collision ...
1
vote
1answer
118 views

Implementing collision response, current implementation does too many checks

I don't know how I should handle my collision response when collision between two entities leads to second collision with third entity. Blue arrow is velocity of the rightmost entity and numbers ...
1
vote
1answer
633 views

How to detect screen boundary using AndEngine GLES1?

I am using the AnalogOnScreenControl to move my sprite around the screen. I would like to restrict the sprite so it can not move outside the screen boundaries. I have tried putting a line at the ...
1
vote
1answer
160 views

Confusing with an articles wording on Clamping a Vector2

I have been reading an article on Collision Detection and how to resolve it. http://www.wildbunny.co.uk/blog/2011/04/20/collision-detection-for-dummies/ In the section describing an AABB vs Circle, ...
1
vote
1answer
476 views

How do 2D physics engines solve the problem of resolving collisions along tiled walls/floors in non-grid-based worlds?

I've been working on implementing my SAT algorithm which has been coming along well, but I've found that I'm at a wall when it comes to its actual use. There are plenty of questions regarding this ...
1
vote
1answer
1k views

2D OBB collision detection, resolving collisions?

I currently use OBBs and I have a vehicle that is a rigid body and some buildings. Here is my update() private void update() { camera.setPosition((vehicle.getPosition().x * camera.getScale()) - ...
1
vote
2answers
148 views

Point vs Convex Hull

I'm trying to implement a simple collision response to a point intersecting a convex hull. So far I can detect if the point is inside the hull. But now I want a collision response that translates ...
1
vote
1answer
552 views

2D Rectangle/Circle Continuous Collision Detection

I'm looking for a fast 2D continuous collision detection algorithm for circles and rotated rects. It needs to determine the time of collision. Both shapes may be moving at high speed, so the ...
1
vote
1answer
155 views

How to resolve collisions smoothly?

Currently my collision method is glitchy, because it gets the last "good" position it was when it wasn't colliding and teleports it to that location when it collides with something. This method works, ...
1
vote
1answer
338 views

AABB vs OBB Collision Resolution jitter on corners

I've implemented a collision library for a character who is an AABB and am resolving collisions between AABB vs AABB and AABB vs OBB. I wanted slopes for certain sections, so I've toyed around with ...
1
vote
1answer
206 views

How to deal with pushing objects out of collision in a physics engine

I'm developing a 3D physics engine (I know, I should use one of the many good existing physics libraries, however my collision detection is optimised for objects with highly ordered highly complex ...
1
vote
2answers
701 views

Resolving 2D Collision with Rectangles

For about a week I've been trying to grasp the basics of collision, but I've been driven to the point of wanting to just give up on everything when it comes to collision. I just don't understand it. ...
1
vote
1answer
128 views

Help with Collision Resolution?

I'm trying to learn about physics by trying to make a simplified GTA 2 clone. My only problem is collision resolution. Everything else works great. I have a rigid body class and from there cars and ...
1
vote
3answers
1k 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 ...
1
vote
1answer
61 views

Collisions and Lists [on hold]

I've run into an issue that breaks my collisions. Here's my method: Gather Input Project Rectangle Check for intersection and ispassable Update The update method is built on object_position * ...
1
vote
1answer
145 views

How do I implement space partitioning in entity component system?

My systems work on components without needing to now anything about entities. I want to implement simple grid partitioning, so each entity will be given a cell based on its current position. But how ...
1
vote
3answers
226 views

Do two balls of different mass bounce different heights?

There are two balls and the only difference between them is the mass. Both are dropped from the same height on to the floor (static object with infinite mass), would both balls bounce up to the same ...
1
vote
2answers
303 views

2D AABBs and resolving multiple collisions

Okay, so this is a problem I've been trying to figure out for quite some time. Mine is a 2D platformer game with a world made up of (usually) immobile tiles and mobile sprites, both of which use AABBs ...
1
vote
1answer
2k views

How do I detect and handle collisions using a tile property with Slick2D?

I am trying to set up collision detection in Slick2D based on a tilemap. I currently have two layers on the maps I'm using, a background layer, and a collision layer. The collision layer has a tile ...
1
vote
1answer
622 views

2D tile-based collisions: using different methods by tile?

I'm trying to write a collision handling method that handles each of the 9 potentially colliding tiles (the player's and the 8 around him) differently according to a "CollisionType" value attached to ...
1
vote
1answer
224 views

Slide effect in voxel collisions

I'm making a voxel engine, and I'm trying to figure out the right way to make efficient collisions with a slide response (making the player slide against the wall). Currently my collisions are pretty ...
1
vote
2answers
454 views

Find the Contact Normal of Rectangle Collision

It seems a lot of people have asked similar questions on this site, and every time it seems like a whole bunch of answers that don't work are given. Basically, I have two rectangles (AABBs) that ...
1
vote
1answer
374 views

How to make a stack stable? Need help for an explicit resting contact scheme (2-dimensional)

Previously, I struggle with the sequential impulse-based method I developed. Thanks to jedediah referring me to this paper, I managed to rebuild the codes and implement the simultaneous impulse based ...
1
vote
1answer
371 views

Simple (and fast) dices physics

I'm programming a throw of 5 dices in Actionscript 3 + AwayPhysics (BulletPhysics port). I had a lot of fun tweaking frictions, masses etc. and in the end I found best results with more physics ...
1
vote
0answers
50 views

Collision repositioning/resolution help

I've been having a trouble with moving objects out of the hitboxes they've just collided with. Here is my (relevant) code so far: Vector2 oposo = other.position; Vector2 poso = ...
1
vote
0answers
97 views

2D Collision Resolution getting stuck on walls

I've been writing this collision detection system using a tutorial from an article I read and I just cannot for the life of me get it to function 100% correctly. Here's the code for starters: ...
1
vote
0answers
58 views

How can I solve this collisions? [closed]

I had tried to make an algorythm to solve box collisions, but it doesn't work as expected. The problem is the boxes wiggle along the space. I use box collision with circle texture. Example of the ...
1
vote
0answers
61 views

how to project a collision between a pair of polygons under rotation?

I am trying to create a physically plausible 2d physics engine. I have read many documents about detection of collisions, contact resolving, interpenetrations, projection, separating axis theorem ...