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 ArticleHow 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 ArticleOBB 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 ArticlePolygon 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 ArticleHow 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 ArticleMake 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 ArticleCalculating 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 ArticleUnderstanding 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 ArticleCollision 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 ArticleChanging 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 ArticleHow 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 ArticleCollision 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 ArticleCollision 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 ArticleSmooth 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 ArticleCollision/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 ArticleMy 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 ArticleSeparating 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 Article2D 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 ArticleManual 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 ArticleCollisions 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
More Pages to Explore .....