A process of adjusting game objects position after collision.

learn more… | top users | synonyms

8
votes
1answer
4k 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 ...
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 ...
11
votes
3answers
4k 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 ...
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 ...
8
votes
3answers
539 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 ...
5
votes
2answers
2k views

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

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

Circle-Rectangle collision in a tile map game

I am making a 2D tile map based putt-putt game. I have collision detection working between the ball and the walls of the map, although when the ball collides at the meeting point between 2 tiles I ...
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 ...
6
votes
2answers
2k views

How to implement friction in a physics engine based on “Advanced Character Physics”

I have implemented a physics engine based on the concepts in the classic text Advanced Character Physics by Thomas Jakobsen. Friction is only discussed very briefly in the article and Jakobsen himself ...
7
votes
2answers
2k 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 ...
5
votes
2answers
710 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 ...
10
votes
4answers
2k 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 ...
5
votes
1answer
287 views

Move penetrating OBB out of another OBB to resolve collision

I'm working on collision resolution for my game. I just need a good way to get an object out of another object if it gets stuck. In this case a car. Here is a typical scenario. The red car is in ...
4
votes
1answer
343 views

Help me please to choose proper path-finding algorithm

I am new to game development and just want to ask for advice. I need to know which path-finding algoritm will be suitable for my scenario: Units - any shape. But in most cases rectangles of ...
4
votes
1answer
674 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 ...
1
vote
1answer
636 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
376 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 ...
0
votes
1answer
410 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
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
2answers
155 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
127 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
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
705 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. ...
0
votes
1answer
168 views

Collision Resolution: Objects “swap” places

I am working on making my own simple collision resolution class so I can learn a bit about how it works, while also improving my entity-component model framework. For those of you unfamiliar with a ...
-1
votes
1answer
163 views

Grid based Collision Detection between circles [duplicate]

I am working on a 2d arcade game where I have 5 types of circles with different sizes: The ship, the missiles, and 3 types of monsters. This is what it looks like: Currently I'm using brute force ...