A process of adjusting game objects position after collision.

learn more… | top users | synonyms

1
vote
0answers
21 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 = ...
1
vote
1answer
125 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
125 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
62 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
67 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
64 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
48 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 ...
1
vote
0answers
54 views

how to project a collision between a pair of polygons under rotation?

I am trying to create a physically plausible 2d physics engine. I have read many documents about detection of collisions, contact resolving, interpenetrations, projection, separating axis theorem ...
3
votes
1answer
66 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
122 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
80 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
81 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
111 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
117 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
40 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
71 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
196 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
240 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
31 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
217 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
55 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) ...
0
votes
1answer
103 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
120 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
191 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 ...
1
vote
1answer
429 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
151 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
216 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
116 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
1answer
190 views

Collision detection with multiple polygons simultaneously

I've written a collision system which detects/resolves collisions between a rectangular player and a convex polygon world using the Separating Axis Theorem. This scheme works fine when the player is ...
2
votes
1answer
112 views

Have the character automatically slide around obstacle corners [duplicate]

Like this: The player is only holding right, however the character still moves up a bit to go around an obstacle. My current collision system has access to: The entity's previous position The ...
4
votes
2answers
281 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 ...
3
votes
1answer
240 views

How to handle the top of a slope in a 2D tile-based platformer?

I'm working on a 2D tile-based platformer that supports 45-degree slope tiles. There are several questions on the topic, but none seem to cover this precise problem that I have. This excellent ...
5
votes
3answers
591 views

When two moving objects collide, which one sends the message, and which one recieves it?

I am writing a platform game using an entity-component system. Entity-World collisions are robust and work very well, and I'm now working on collisions between entities. Just to be clear, in my code ...
0
votes
1answer
279 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, ...
7
votes
3answers
485 views

Reusable top-down collision class

I've recently picked up monogame and am working on a simple top down game to get me started and learn the basics. I've got the movement and the rotation to follow the mouse sorted out but I'm stuck ...
4
votes
1answer
204 views

Collision Detection problems for vertically moving platforms

Background My game is a static screen (ie, no scrolling) 2d platformer and my CD routine is split into 2 - after vertical movements, (ie, gravity etc) I check for collisions, and if they are ...
0
votes
1answer
160 views

Resolving a collision between point and moving line

I am designing a 2d physics engine that uses Verlet integration for moving points (velocities mentioned below can be derived), constraints to represent moving line segments, and continuous collision ...
0
votes
1answer
509 views

gamemaker getting a ball to bounce 90 degrees off of a 45 angle

I am trying to get a circle to bounce off a 45 degree diamond shap using Gamemaker Studio. I would like the ball to bounce in straight lines so my directions would be 0, 90, 180, or 270 degrees, ...
0
votes
1answer
748 views

Separate axis theorem applied to AABB misunderstood

I'm trying to implement a collision system for a 2D platformer using the SAT algorithm. For what i need, my implementation only handles AABB's, i followed the instructions given here. It works, there ...
0
votes
0answers
83 views

A way to obscure vision when its blocked? [duplicate]

I'm creating a classic top-down shooter kind-of-thing but I don't want to player to be able to see everything freely. Basically the question is as follows; is there a smart way to block vision of ...
1
vote
1answer
1k 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 ...
3
votes
1answer
253 views

Sensor based vs. AABB based collision

I'm trying to write a simple collision system, which will probably be primarily used for 2D platformers, and I've been planning out an AABB system for a few weeks now, which will work seamlessly with ...
3
votes
1answer
239 views

2D collision resolution: works on each axis individually, but not with both combined

My collision detection method is solid and detects box to box collision every time. Then comes the resolve part which I'm struggling with quite a bit. It works perfectly when I'm manipulating the ...
0
votes
0answers
321 views

Alternative to unity's character controller

I wonder what you guy would do for a cheap replacement of character controller in unity. I try a bunch of implementation and they don't work at all, what I'm doing wrong? I'm trying to make a game ...
0
votes
1answer
156 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 ...
3
votes
1answer
140 views

How do you get the collision plane when using AABBs? [duplicate]

My collision detection initially seemed to work well enough, but my answer to this question shows that I have went with SAT testing now instead. My goal was to find the plane at which to slide the ...
0
votes
1answer
128 views

Simple Bounding Box Multiple Collision problem

I'm making my first game, and in it I use a moving ball to hit static blocks (kinda like breakout). Basically, I loop through all of the static blocks on the screen each frame, update the position ...
2
votes
3answers
177 views

Determining which edge a collision occurred on in a platformer

First of all, this will be Open Source, and you will be mentioned for the help. We've been programming a Super Mario Remake for the iPhone with Cocos2d for school. It looks pretty great, and we ...
27
votes
6answers
2k 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 ...
3
votes
1answer
183 views

Is it possible to get the colliding sides using the separating axis theorem?

The title says it all, is it even possible to get the colliding sides? I'm checking for collisions between two OABBs, which works fine using SAT. Now I want to set the moving object's velocity to the ...