A process of adjusting game objects position after collision.

learn more… | top users | synonyms

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 ...
0
votes
2answers
367 views

using per pixel collision for an elastic response

I realize this might be open ended ended but curious if I just did some over kill... I had this http://xbox.create.msdn.com/en-US/education/catalog/tutorial/collision_2d_perpixel and i reworked it ...
2
votes
3answers
228 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
174 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
257 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, ...
4
votes
1answer
1k views

Collision with tile corners/seams in 2D platformer

There seems to be a lot of somewhat related questions answered already, but none I read answered my exact problem. I have a 2D platformer whose world is made entirely out of tiles that are in a ...
3
votes
2answers
410 views

Collisions between moving ball and polygons

I know this is a very typical problem and that there area a lot of similar questions, but I have been looking for a while and I have not found anything that fits what I want. I am developing a 2D ...
3
votes
1answer
373 views

SAT and then what?

I am on my way to make another Arkanoid game but this time I decided that I want it a little bit more realistic than just checking intersections between AABB and inverting one vector's component on ...
4
votes
3answers
3k views

Implementing Separating Axis Theorem (SAT) and Minimum Translation Vector (MTV)

I was following codezealot's tutorial on SAT and MTV and trying to implement it myself but I've come a cropper when it comes to getting the correct MTV. Here is my example: (Cue pretty pictures...) ...
3
votes
2answers
717 views

AABB > AABB collision response?

I'm really confused about how to fix this in 3d? I want it so that I can slide along cubes but without getting caught if there's 2 adjacent cubes. I've gotten it so that I can do x collision, with ...
9
votes
4answers
1k views

Collision rectangle response

I'm having difficulties getting a moveable rectangle to collide with more than one rectangle. I'm using SFML and it has a handy function called intersects which takes 2 rectangles and returns the ...
3
votes
1answer
963 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 ...
0
votes
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 ...
6
votes
5answers
760 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 ...
4
votes
1answer
648 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 ...
5
votes
2answers
2k views

Collision Detection, player correction

I am having some problems with collision detection, I have 2 types of objects excluding the player. Tiles and what I call MapObjects. The tiles are all 16x16, where the MapObjects can be any size, but ...
7
votes
1answer
3k 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 ...
1
vote
1answer
349 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 ...
2
votes
1answer
224 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
371 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 ...
0
votes
1answer
392 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 ...
3
votes
1answer
517 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), ...
4
votes
3answers
227 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 ...
7
votes
2answers
1k 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 ...
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 ...
3
votes
3answers
2k 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 ...
2
votes
1answer
977 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 ...
6
votes
3answers
494 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 ...
1
vote
3answers
909 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 ...
17
votes
4answers
3k 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 ...
3
votes
1answer
224 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 ...
4
votes
2answers
649 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 ...
11
votes
3answers
3k 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 ...
12
votes
4answers
2k 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 ...