Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
3
votes
2answers
188 views

Collision avoidance not only AI wrong

I am trying to implement the game similar to Dota 2 or Warcraft 3. I want this: when user clicks the right mouse button I want to navigate to the click position. However if there is an obstacle in my ...
5
votes
0answers
44 views

If collision move around the collider

I am writing a game in Java, I have this long method to move GameBodyObject towards the point: ...
1
vote
1answer
543 views

game physics: contact constraint and relative velocity

For two rigidbodies (2D boxes), A and B, I have been colliding A with B and finding the collision normal pointing towards A i.e. the direction that would separate A from B. When it comes to ...
0
votes
1answer
67 views

collisions: How to handle contact constraints for a rigidbody constrained to a line segment

I'm trying to come up with a strategy to handle a situation in 2D, where a rigidbody moves along a straight line segment, and can collide with other similar bodies and also static tiles. A naive ...
2
votes
1answer
99 views

How to detect and prevent the resolution of fake collisions?

I'm creating my own physics engine and I came across a small inconvenience. Here how it goes: when a body tries to push into something it really can't push, it gets pushed back (which is completly ...
2
votes
2answers
997 views

Physics engine and squishing of stacked objects

I have a general question that seems to apply to most physics Engines (Box2D, Unity, Matter.js, …). I'm trying to make a tower of rectangular objects that are stacked on the [static/mass=infinity] ...
0
votes
1answer
206 views

Polygon-Circle Collision Algorithm not working

EDIT: Updated code and video I've been working on one of the last pieces of my collision detection system for my game, a polygon-circle collision method. I'm almost there with it, but there's a few ...
4
votes
1answer
199 views

Issues with player movement and character interaction within Pygame

I am working on a small game that deals the main character, which is a cat, and dogs that chase it. The dogs are able to wander around like they are supposed to do, but the cat will only move a small ...
3
votes
1answer
483 views

Rigid body falls through static mesh even though collision is detected

I'm using Jitter Physics to create a game. For testing, I have ball (a spherical rigid body) falling onto a small box-like mesh. The problem is that the ball falls straight through the floor, even ...
0
votes
1answer
60 views

How to stop player falling through blocks without bounce

So I have this game and I have applied gravity to it and when I load it up it just falls through the blocks and out of the screen. I have tried the bounce event but it just goes into an endless loop ...
2
votes
1answer
1k views

Pattern for collision handling?

I am writing a game with Java. There are many different kinds of entities on the screen, like the player, NPCs, monsters, bullets, items, shiftable blocks and so on. This question is not about ...
8
votes
1answer
620 views

How do I prevent jitter amongst near-stationary physics objects?

I have been implementing a custom physics engine, and I'm pretty close to having it working as I would like it to. There is a gravitational force, collisions and collision response. Unfortunately, ...
1
vote
0answers
228 views

Stuck at tile seams using 2D collision

I'm making a little top down 2D dungeon crawler, and have pretty much fallen over at collision detection with my dungeon walls. I have figured out how to stop my player sprite at the walls, but I'm ...
1
vote
1answer
163 views

Java 2D Game: Collision help

Ok, so in my Java2D Game, using swing/awt (I hear it is not the best to combine those), I am trying to finish collisions. So, the problem is, the "if (player.xvel < 0) { }" and the "if (player....
1
vote
0answers
124 views

SAT collision detection and stacking objects

I'm working on a small game for Android which deals with some simple physics, including the need to stack objects on top of one another without jitter. This infamous "stacking collisions" issue with ...
1
vote
1answer
2k views

LibGDX - Rectangle Collision and Response

I've been using LibGDX for the past few weeks and I have some problems that I need help on. What I need help on is understanding how to use LibGDX Rectangle class ...
1
vote
1answer
521 views

Prevent camera from moving through walls (no engine or framework)

I'm building a fairly basic 3D first-person puzzle game. The only objects for which collisions matter are walls, and all walls are at convenient 90 degree angles aligned with the coordinate axes. ...
1
vote
2answers
108 views

Detect which Entity caused the collision

I have a 2D plane with two or more moving entities (polygons with an AABB). On collision both of them will go through a "collidesWith" Method, where I have access to both entities but only want to ...
1
vote
2answers
707 views

2D - Need help understanding how to resolve multiple collisions in a simple physics engine

I am trying to create a small game engine in Java using only basic openGL functions and implementing everything else from scratch. I am trying to get a basic physics engine working (similar to box2D ...
0
votes
1answer
596 views

Ball bounce in 3d

I cannot get my bounce equations right. I have 2 spheres, that can colide at any angle. One is forever stationary, other one is moving though the space. I have X,Y,Z speed of the moving ball and a ...
0
votes
1answer
180 views

How to prevent corner slipping with a shortest axis collision solver

Currently I use AABB's to represent objects in my game engine, I resolve collisions between them by finding the shallowest axis, but this leads to a problem if an object is approaching another in a ...
2
votes
1answer
1k views

How to handle collision detection & response in voxel engine with slopes?

Voxels are fairly small An object can span an area of 8x8x8 or more Vertices of Voxel Type are always snapped to the grid: Voxel types are convex (except the ...
2
votes
1answer
100 views

Achieve same effect as a FixedJoint2D but also match RigidBody2D forces

Trying to make an object that is affected by rigidbody physics in exactly the same way as the object it's linked to. So torque, velocity, and any resultant torque or velocity from a collision. This ...
1
vote
1answer
77 views

XNA player/tile collision not working perfectly

So I've built a map tile engine in XNA, and have been working on the player/tile collision. The method I'm using works well to some extent, but the player will often move through the walls and get ...
1
vote
2answers
423 views

Adding collisions to a 3D mmorpg game

I'm creating a mmorpg game with a little team, and we want to add a player-objets collisions system. We want players to be able to walk on a heightmap ground, and walk/be blocked by objects. I found ...
3
votes
2answers
272 views

Inelastic ball collision

I'm trying to implement basic inelastic ball collision. The example on the link above is for one dimension. It explains that it's the same for 2D but where the velocities are the components in the ...
0
votes
2answers
463 views

Collision handling for grid based games and simulations

I'm trying to implement a grid based game where there are many creatures moving in the grid from square to square. I'm having a hard time handling collision with creatures in the grid (multiple ...
1
vote
1answer
2k views

How can I calculate the penetration depth between two colliding 3D AABBs?

I'm currently working on implementing a very basic collision system in my game at the moment that only uses 3D AABBs. My AABB struct currently looks like this at ...
1
vote
0answers
31 views

Defining collision rules in Farseer XNA

I'm trying to integrate Farseer into my XNA game. Since I'm using an EntityComponentSystem approach, I've added the Body inside a component and added it to the players' components. One thing I'm ...
0
votes
1answer
27 views

Increasing mass in ineleastic collision by orders of magnitude resultsin little change in velocity

When increasing my rocketMass from 10 to 1000 or to a 1000 or bringing my shipMass down to 1, I notice very little increase in how far the ship's final inertia is. I'm expecting that increasing from ...
1
vote
0answers
73 views

How do 3D player collision work? [closed]

I don't really know how to explain this but I have always wondered how simple player movement collision work. Take Half-Life or Counter-Strike for example. Their player collision against the world ...
0
votes
2answers
315 views

Why is my collision code blocking the player's movement in XNA?

I have the following code to check for collisions in my game, but this code doesn't work it as should. For example: I go from up to down and if collision is detect I can't turn right; if I go from ...
1
vote
0answers
432 views

How to resolve multiple simultaneous ball collisions in a pool game?

I'm trying to simulate a break shot in billiards (1 ball hits a pyramid of 15 balls). The formula for 2D ball collision works correctly in my game. But when it is applied to the break-shot, the result ...
3
votes
1answer
365 views

Game Physics: Calculating a collision response using the Separating Axis Theorem?

I am working on a project in which I have implemented the Separating Axis Theorem to detect collisions between objects. My current collision response is an object that contains whether it is ...
1
vote
0answers
377 views

Handle floating point precision errors in collision detection and resolution

I am experimenting with a continuous collision detection and response of points on a tile map. This are my results for now: I did this by shooting a ray (red line) from the current position (red ...
9
votes
3answers
305 views

Strategies for dealing with crowds at choke-points

I've recently switched my game engine over from steering behaviours to impulse based movement with proper time based collision resolution. This has solved so many problems (no more tunnelling, yay) ...
8
votes
2answers
1k views

Collisions between players in multiplayer racing game

I'm creating a simple racing game (spaceships, no gravity) using p2.js, phaser and node.js. What I have done: Client receives world state from server: extrapolate other players based on latest ...
4
votes
1answer
838 views

How to handle collision detection

So the way that I am doing the movement for my game is that you can left click a unit (which is just a rectangle object), and then it is selected. While it is selected, you can right click and that ...
0
votes
1answer
55 views

Canvas/Paint Mechanic

I'm currently working on an idea for a Unity game app with a canvas mechanic. I understand I may have to use particles for the brush/paint f/x however I can not think of a way to add collision ...
12
votes
2answers
3k views

Storing coordinates of every object in server side in MMOs

In an MMORPG: Is it typical or feasible to store the coordinates of every tree, bush rock.. etc in the server side for collision detection? If so, what would be a feasible way to store such a huge ...
0
votes
1answer
1k views

AABB Collision Problems in SFML

I have a problem with AABB collision. I am making a top down rougelike in SFML and my collision algorithm does't quite work properly. HERE IS A GIF OF THE PROBLEM. It mostly works, except for when ...
0
votes
1answer
104 views

Collision between free player and tilebased map

so I'm working on some sort of platformer in javascript where the map is tilebased but the player can move freely. Now, i have a problem with collision detection/response. It's kind of obvious what I'...
4
votes
2answers
1k views

2D Platformer AABB collision issues

Before anyone say that this questions already has a answer, I will list all the questions I read and tried: AABB collision resolution issues Trouble with AABB collision response and physics https://...
5
votes
4answers
2k views

Lunar Lander calculating gravity, acceleration and collision in GameMaker

I've already asked this on the GameMaker forums but had no response so far. I'm making a little Lunar Lander game as my first foray in to GameMaker, I'm wanting to have the ship land and take off ...
1
vote
2answers
267 views

Can I make this physics simulation any faster?

I've made a little real time physics simulation that solves some bodies. CirclevCircle && CirclevOrientedRect I would like someone to tell me if I'm doing something drastically wrong. I know ...
2
votes
1answer
158 views

Collision resolution when moving in two directions

I am making a bomberman clone and I'm having problems regarding moving on both x and y axis (pressing down+left, down+right, up+left). Here is a video to demonstrate the problem. I use Tiled for the ...
0
votes
1answer
289 views

Tile-based collision problem with corners

I am currently making a tile based collision system. But I encountered a big problem I can't seem to figure out. Use the image bellow for reference. Gray lines represent the border between tiles. ...
0
votes
2answers
142 views

Collision works except for when coming from right side

I am trying to make a bomberman clone. I'm having problems with the collision on the walls that is not on the sides of the map (see image). When I come from the right (going left), the red square (...
0
votes
0answers
186 views

Circle velocities stay the same after elastic 2D collision

I am following this paper in trying to create elastic 2D collisions among two circles. The problem is that my end velocities are the same as my start velocities. I've looked over my code and don't see ...
3
votes
1answer
570 views

Resolving collisions with float precision errors

I'm facing a problem when I try to resolve the collision between two units using floats as positions of the units in my game. I am detecting the collisions using the SweptAABB algorithm and if there ...

1 2
3
4 5
8