Quantcast
Channel: Question and Answer » collision-resolution
Browsing all 66 articles
Browse latest View live

making rigid body stop using friction

how am I suppose to apply friction to an object so that when I apply force it decelerates eventually to zero? Here are my physics objects: Rigid Body “Sphere” Collision shape: btSphereShape(0.50) Mass:...

View Article



How do I handle collision response between many different types of game objects?

I am looking for a way to avoid the dreaded switch or if/else scenarios between numerous game object types when a collision takes place in a game. For example: You have a list of game objects which...

View Article

Image may be NSFW.
Clik here to view.

OBB Collision Resolution: Jittering with Long Rectangles

I have been working on a physics simulation module. Almost everything works properly, but I am having an issue, which I have demonstrated in the following video. http://youtu.be/2L17y9Lme0Q As you can...

View Article

Polygon Collision Response

I’m working on a game engine that has a built in custom physics engine (I know it’s a waste of time, but I have years to make this, so why not make it good?). Currently, with any number of polygons,...

View Article

Image may be NSFW.
Clik here to view.

How do I resolve a sphere-triangle collision in a given direction?

I am trying my hand at game physics. I understand that the basic way to pull back a sphere when it collided is to negate the penetration distance: // If collided... // `distance`: distance form...

View Article


Image may be NSFW.
Clik here to view.

Make the player run onto stairs smoothly

I have a 2D Platform game, where the player Always runs to the right, but the terrain isn’t Always horizontal. Example: I implemented a bounding-box collision system that just checks for intersections...

View Article

Image may be NSFW.
Clik here to view.

Calculating impulse with multiple collision points

In my amateur 2D rigid body physics engine for a game I react on collisions between two bodies with an impulse j (formula 11) as explained here. To calculate this impulse I need one contact point P...

View Article

Understanding the use of MTV for an elastic collision response

So, I’m trying to simulate polygon physics, both linear and angular. To calculate the MTV is easy in SAT (Minimum Translation Vector), and to use it to adjust position is also easy: PolygonA.center -=...

View Article


Collision detection doesn't register until player sprite jumps

I have implemented a shooting mechanic into my game, and the act of shooting works fine. The shooting work is done in my “game1″ class. The issue that arises is when I incorporate collision detection...

View Article


Changing direction after collision

In the first tutorial for GameMaker (catch the clown), I want to set the direction of the clown after the collision with the wall. I want to do it by pressing the wall object with the mouse (before the...

View Article

How to properly handle top down 2D collision?

I can never seem to get this right, well polished at least. I’m creating a top down game in XNA, and collision has always been an issue for me to do properly. Detecting collision is fine, but resolving...

View Article

Collision detection doesn't register until player sprite jumps

I have implemented a shooting mechanic into my game, and the act of shooting works fine. The shooting work is done in my “game1″ class. The issue that arises is when I incorporate collision detection...

View Article

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 = position; if (hspeed...

View Article


Smooth radial collision

I’m trying to make collisions smoother in my game. Currently, entities will stop completely when they collide with an obstacle. I saw the following article recently:...

View Article

Image may be NSFW.
Clik here to view.

Collision/Intersection of (2D) Ray to Line Segment

Given a ray (r0, r1) and a line segment (a, b), I need to calculate the normal of the line segment based on the direction of the ray. For example, in the following picture: The correct normal given the...

View Article


My pool balls often jump around when there are two or more balls...

I’m working through the book ‘Introduction to Game Physics with Box2D’ and I’ve created a little pool game with the example code. Despite the name, there is NO box 2D used in this particular exercise....

View Article

Image may be NSFW.
Clik here to view.

Separating Axis Theorem contactNormal

I implemented the separating axes theorem as described in “Real time collision detection” by Ericson for my OBB vs OBB collision. Got that working. To continue with my collision response I need more or...

View Article


Image may be NSFW.
Clik here to view.

2D Distance Field as collision handler method

Pixeljunk Shooter has really cool fluid simulation. I found the dev’s video explaining what they did. Here I understand that it is particle based simulation Smoothed Particle Hydrodynamic I can find...

View Article

Manual response when 2 shapes made of rectangular volumes collide

I have 2 compound objects made of rectangular blocks. One of them (the one that is moving) has a script that listens to OnTrigger callbacks. What I need is to position the moving compound object on the...

View Article

Collisions and Lists [closed]

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 *...

View Article
Browsing all 66 articles
Browse latest View live




Latest Images