A process of adjusting game objects position after collision.

learn more… | top users | synonyms

0
votes
0answers
7 views

JBullet - Two RigidBodies will not collide

I am adding two ships into my collision world. (The green dots are the collision shape (an ObjectArrayList) that I am passing to the ConvexHullShape) However they don't seem to collide. In fact, ...
0
votes
2answers
43 views

How to keep a shape inside a rectangle

So i'm making a game which is based on randomly generated rooms and i need a way to keep the player inside them and make the player glide when he collides with the room's bounds. I currently have a ...
0
votes
0answers
15 views

SAT MTV collision resolution jittering

Edit: I have updated my approach a bit, but now the problem is that if i'm outside a wall i stick to it, basically i get the Desired vector of motion and move there. Also how would i adapt this ...
1
vote
0answers
20 views

Collision callbacks in a javascript engine

I'm making a game engine in javascript for Educational purpose. I already have the collision detection and collision response parts and are working fine, but i want to let the user define his action ...
0
votes
2answers
70 views

Circle-Circle collision resolution

This seems easy but I can't figure it out, when I have one circle(c1) collide with another(c2) I give the c2 circle the heading of c1 and send the c1 circle on the normal vector to the heading (the ...
0
votes
0answers
30 views

How can I create a collision like the ball and peg in Peggle?

I'm making a game which requires the same type of collision as Peggle. I know of the 3 main types (elastic, inelastic and perfectly inelastic) but those result in both objects moving after the ...
0
votes
3answers
119 views

Bringing islands close together programmatically

I generate island/continent maps and I want to make a grand archipelago of sorts where all these islands are located. The problem is that I don't know a smart way to place the islands programmatically ...
0
votes
0answers
19 views

How do I find at least the closest penetrating point with SAT? [duplicate]

For more accurate simulations, I want to find the closest point of another polygon to one polygon's center when they collide. Is this possible with the SAT algorithm? Is it a good strategy at all for ...
-1
votes
1answer
36 views

How do I calculate force from collision between 2 rigidbodies in 2D?

I have a physics engine based on the Game Physics Engine Development by Ian Millington. In chapter 7.1.1, it provides the formula: V = (pA.Velocity - pB.Velocity) * (pA - pB).normalized where V is ...
1
vote
0answers
23 views

2D Polygon Collision push direction with large polygons

I have a collision detection/resolution implementation that uses the Separating Axis Theorem. Detection and such works perfectly fine, as well as resolution for most objects/shapes in my game. ...
0
votes
1answer
37 views

How to prevent constant adjustments form collision?

I'm try to clone a popular 2D platformer as a project. For both the player character and enemies, whenever I constantly check to see if they are walking on the ground or floating platforms, they ...
1
vote
2answers
77 views

Defining collision response in an Entity system

I'm building a really simple top-down 2d shooter which uses an Entity Component pattern. I've added several different entities to a level and given them different collision groups. I have an entity ...
1
vote
1answer
52 views

How to implement this collision detection function?

I would like to know how to implement this collision detection function, but I'm not even sure what it's called. The input shapes are 2D convex polygons, with an optional "rounding radius": imagine ...
1
vote
3answers
213 views

Collision between AABB and Circle

I'm programming collision systems for a 2D game engine. The idea is that different systems can interact with each other. So one of the cases would be check collisions between axis aligned bounding box ...
1
vote
1answer
78 views

Help with Resolving Pixel Perfect Collision

Hi I'm having trouble resolving "Collision detection between axis-aligned bounding box and bitmap (pixel perfect) terrain on a Worms type game". (Read previous question to find more information about ...
0
votes
1answer
86 views

How to resolse collision between moving and static AABB?

What I have is a map represented as list of Rectangles and player's rectangle. Also I have function to determine depth of the collision: Point TestAABBAABB(Rectangle a, Rectangle b) { ...
2
votes
1answer
41 views

Collision detection between axis-aligned bounding box and bitmap (pixel perfect) terrain

Working on a Worms-type game, I have my objects in bounding boxes and they sit on the pixel terrain. Currently I am able to successfully do the collision detection for objects when they enter the ...
0
votes
1answer
60 views

Cocos2d - Physics bodies randomly loosing Velocity along an axis after impact

This just started occurring and seems to randomly happen during, and between, game sessions. A dynamic moving body collides with a static body and instead of bouncing off looses (almost completely) ...
0
votes
1answer
66 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 ...
1
vote
1answer
112 views

Cocos2dx+Chipmunk: Fully elastic collision between moving bodies

I'm using Cocos2dx and the built in Chipmunk physics engine, and currently I've got my PhysicsBodys' materials set up with: Density=0 Restitution=1 Friction=0 in order to get fully elastic ...
0
votes
1answer
86 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
0answers
32 views

PhysicsJS object falls through the world

I have a problem while using PhysicsJS when it comes to collisions. I created a physics world, an object and applied gravity. I put the object at a certain position, it falls down because of the ...
0
votes
1answer
107 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
2answers
68 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: public void ...
0
votes
1answer
53 views

Array Rectangle Collision Handling Inconsistency XNA 4.0 [closed]

I made a simple collision detection prototype.Here's the code for the Player class's collision handler: public void handleCollision(GameObject OtherObject) { ...
0
votes
2answers
79 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 ...
0
votes
0answers
148 views

2D AABB vs AABB side of collision and collision depth

I realize there have been a multitude of questions involving 2D AABB vs AABB collision, but the questions and responses always avoid the simple questions that make it difficult. To keep things ...
1
vote
1answer
110 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 ...
0
votes
1answer
90 views

c++ - collision detection/resolution clipping

I'm trying to implement a collision detection system, and it is working for the most part, no overlapping (or at most very little overlapping) of characters, and wall collisions. The problem is that i ...
1
vote
1answer
210 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
0answers
53 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
1answer
97 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 ...
0
votes
0answers
120 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
102 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
100 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
102 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
438 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
75 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
92 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
198 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
99 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
104 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
131 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
1answer
110 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
89 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
67 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
148 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
310 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
80 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
3answers
305 views

How do I resolve a collision of a circle with two rectangle corners?

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