Questions tagged [collision-resolution]
A process of adjusting game objects position after collision.
424
questions
0
votes
1
answer
483
views
How do I get realistic sliding contact between objects in a voxel grid?
I have a 3D grid of voxels in my game. Entities walk around with simple physics that represents them as an axis aligned bounding box with velocity, mass and acceleration. The way I'm doing collision ...
2
votes
1
answer
4k
views
Unity: Smooth collision
I'm making a topdown 2D RPG in Unity.
All moveable objects have Rigidbody2D-components with gravity set to 0, linear drag set to 5 and different masses.
Walls are stationary boxes with BoxCollider2Ds.
...
0
votes
2
answers
295
views
Stuttering Character When Colliding With Wall XNA 4.0 Help!
I'm trying to make a platformer game without tiles. I've made a collision handler to handle collision between Player and Stage(platform)and a collision checker, here's the code:
...
0
votes
1
answer
1k
views
How do I calculate the bounce vector of a ball hitting the starting point of a segment?
I have a ball (with parameters x, y, radius) that travels on the screen (with vectors directionX directionY) and can collide with a segment with random slope (with parameters startX, startY, stopX, ...
0
votes
2
answers
2k
views
Unity2D Best way to determine degrees between two colliding entities?
I'm trying to determine the collision-direction between two objects. I'll be using this for various things such as creating blood-entities in a specific direction proportional to where the other ...
4
votes
1
answer
784
views
How do I avoid causing more collisions, when resolving multiple AABB collisions?
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 ...
5
votes
2
answers
2k
views
How do I avoid 3D AABB collision response getting stuck at block edges?
I want the player to be able to slide along cubes, but without getting caught at the seam between 2 adjacent cubes. I've gotten it so that I can do x collision, with sliding, and y, and z, but I can'...
5
votes
1
answer
3k
views
How do I make a collision between AABBs slide?
I have a room with objects inside. Each object has it's own AABB.
I know how to check for collisions between the objects with an AABB-AABB intersection.
How do I calculate an appropriate collision ...
5
votes
2
answers
3k
views
How do I resolve a collision of a rectangle with two rectangular tiles at once?
I am having some problems with collision detection between a player and the environment in a tile-based game. I have a player objects, Tiles and what I call ...
39
votes
6
answers
8k
views
Hexagon collision detection for fast moving objects?
A object has a position and a speed vector. Usually only the position is used to check if two objects collide, this is problematic for very fast moving objects as it can happen that the object moves ...
1
vote
1
answer
557
views
2D Collision : detection and design [duplicate]
So, listening to this very smart piece of advice, I've already completed a basic Tetris game. Moving on, I started a small breakout. But suddenly : a nightmare came. Collisions.
Since I've been ...
1
vote
1
answer
2k
views
AABB swept collision response with voxel world
I followed this tutorial: link and I was able to make it work with 3d voxel world collisions.
But the problem I have is with collision response. I want to make player slide against the wall if he is ...
1
vote
0
answers
63
views
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 ...
1
vote
1
answer
4k
views
Triangular Mesh Collision/ Resolution
I've been trying some different approaches for collision detection and now I want to try to implement simple Mesh-Mesh collision detection for triangular meshes. I'm wondering if I'm on the right ...
2
votes
0
answers
1k
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 ...
2
votes
1
answer
219
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.
...
4
votes
3
answers
950
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 have ...
0
votes
1
answer
447
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
2
answers
114
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 ...
2
votes
2
answers
361
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
1
answer
1k
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 ...
1
vote
1
answer
82
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 ...
-1
votes
1
answer
192
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:
http://www.gamedev.net/page/...
4
votes
1
answer
5k
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. ...
2
votes
0
answers
472
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 ...
7
votes
3
answers
9k
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...)
I'...
1
vote
1
answer
3k
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 ...
1
vote
1
answer
205
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 ...
11
votes
4
answers
4k
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 ...
2
votes
1
answer
2k
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 ...
1
vote
1
answer
3k
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 ...
0
votes
1
answer
577
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 ...
0
votes
2
answers
2k
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 ...
9
votes
2
answers
9k
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
1
answer
361
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:
...
15
votes
4
answers
4k
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 ...
2
votes
2
answers
2k
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.
...
1
vote
0
answers
73
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 &...
3
votes
1
answer
311
views
How can I easily model semi-realistically human movement and collision in a 2D game?
I am writing a sports simulation game in which the simulated players will interact physically with each other (i.e. tackle, push, bump...) as well as do individual actions such as changing direction ...
-1
votes
1
answer
1k
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
1
answer
10k
views
How do I detect and handle collisions using a tile property with Slick2D?
I am trying to set up collision detection in Slick2D based on a tilemap. I currently have two layers on the maps I'm using, a background layer, and a collision layer. The collision layer has a tile ...
2
votes
1
answer
5k
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 ...
3
votes
1
answer
1k
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
1
answer
993
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)
...
2
votes
1
answer
352
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 ...
2
votes
2
answers
1k
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 ...
6
votes
1
answer
5k
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 ...
2
votes
1
answer
237
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 ...
0
votes
1
answer
391
views
Having to check collisions twice per game tic
I have vertically moving elevators (3 solid tiles wide) and static solid tiles. Each are separate entities and therefore have their own respective collision routines (to check for, and resolve, ...
4
votes
2
answers
1k
views
Allowing a player to walk up and down slopes without resistance
I am trying to implement a platformer where both the player and the level are made up of arbitary polygons. One requirement is that the player can stand still on slopes, and walk up and down them ...