Tagged Questions

A process of adjusting game objects position after collision.

learn more… | top users | synonyms

0
votes
0answers
16 views

Bullet Physics for Collision Detection and Smooth Response

I'm creating a game using LibGDX, and to prevent the need to spend lots of time writing collision detection code I've decided to make use of Bullet Physics, simply for collision detection and not for ...
0
votes
0answers
45 views

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

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

My pool balls often jump around when there are two or more balls colliding/touching

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. ...
1
vote
1answer
61 views

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 ...
0
votes
1answer
40 views

Circle-line segment collision resolution

I'm trying to make a side-scrolling game using this method and I'm having some trouble getting it to behave right. The collision shapes consist of multiple connected line segments and I'm checking ...
2
votes
2answers
87 views

How to preserve topology for penetration correction?

I have a sorted list of blocks - some may overlap some may not. Each block has an ideal starting position and may be constrained to one axis. There are no velocity or acceleration or other forces ...
3
votes
3answers
138 views

Lerping character moving up and down slope tiles

So, when interpolating position against a standard 'horizontal' platform, everything works great. What happens is something like this..... (Question continues after graphic) Now, the question I ...
2
votes
2answers
66 views

Rendering after interpolating, renders inside/outside other objects

So, we're working out our interpolated render-coordinates during our render call and it's doing a fantastic job of smoothing everything out. All is great and collision detection is working to a ...
2
votes
1answer
88 views

How to calculate max region/area of 2d circles?

I have some 2d circles on a plane, each has its own minRadius and maxRadius. When two circles collides, both of them will shrink their radius, so the actual radius of a circle is in range [minRadius, ...
2
votes
1answer
108 views

How do I resolve a collision involving more than two objects?

I have working functions that compute the overlapping polyhedron, contact points, depth of penetration (DOP), etc. of the overlap between two objects with convex polyhedra shapes. I know how to ...
0
votes
0answers
45 views

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

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: ...
1
vote
1answer
63 views

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 * ...
0
votes
1answer
89 views

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 ...
4
votes
3answers
234 views

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

How can I find the collision response between a moving sphere and cube?

I'm implementing my own algorithm for sphere and cube collision response. So far I'm able to only test if both of them overlap. My problem is: A cube is rotating around its axes i.e x and z axes. And ...
1
vote
2answers
242 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 ...
0
votes
1answer
94 views

Collision detection recommendations [closed]

I am currently developing a prototype game for mobile devices in which the user will see several objects on the screen and will have to touch them one by one in the correct order to win. I guess it ...
1
vote
1answer
192 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 ...
0
votes
0answers
132 views

Realistic collisions with a kinematic rigidbody?

I have a car game where player drives a car; this car has a collider and a kinematic rigidbody attached and is completely controller by script (i.e. a script sets its position and rotation). In the ...
9
votes
4answers
700 views

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 ...
0
votes
1answer
229 views

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 ...
1
vote
0answers
52 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 = ...
3
votes
1answer
267 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. ...
0
votes
1answer
385 views

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

Minkowski sum for circle + rectangle collision resolution (which 'side' was hit)

This question, on determining which side a rectangle has collided on (with another rectangle) has been a great help in writing my collision resolution code. However, I'm dealing with a circle and a ...
0
votes
1answer
113 views

How do physics engines like Box2D detect and respond to collisions between arbitrary polygons?

I've always wondered how collision detection like this was achieved, and I've always wondered what the response would be. Do they perform line-line intersection tests for each line making up the two ...
1
vote
0answers
106 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
59 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 ...
3
votes
1answer
149 views

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

Tile map collision and object handling

I want to program a game. In this game there is a tile map and objects that interact with it and them self. For that I made first a TileMap class, in it is only the data of the tile map. Its a very ...
0
votes
0answers
146 views

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, ...
0
votes
1answer
129 views

Strange collision in Breakout [closed]

My Breakout game works fine so far, but I struggle with the collision detection... Well... just with the collision from the ball with the brick... Here's the relevant code: List<Brick> ...
1
vote
3answers
470 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 ...
2
votes
2answers
184 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, ...
1
vote
0answers
41 views

Calculating Friction due to rotation from ball bounce? [duplicate]

In this question asked by codemonkey, The rotation will depend upon: upon impact, on: Initial Speed of the ball hitting the surface (magnitude of ball velocity vector) Friction co-efficient of ball ...
-1
votes
1answer
237 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 ...
1
vote
2answers
495 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 ...
0
votes
1answer
622 views

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 ...
1
vote
0answers
35 views

Calculating contact points with SAT [duplicate]

after detecting collision between two convex shape by using separating axis theorem and calculating MTV, how can i calculate the contact points ?(for applying torque to the rigid body).
3
votes
1answer
283 views

Collision detection for sloping tiles

I've been looking into adding 'sloping' tiles into my platform game and my first attempt at collision detection with these tiles has produced some promising results (considering it's a first attempt), ...
0
votes
1answer
108 views

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) ...
1
vote
1answer
127 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
2answers
183 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 ...
0
votes
2answers
234 views

How to detect collision between a camera and a mesh?

I am wondering how you would be able to extract mesh properties (i.e. faces, vertices, and vertex normals) and use them to create a collidable object, one that a camera can't go through ? I am using ...
3
votes
1answer
675 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
158 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
460 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 ...
2
votes
1answer
137 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 ...