Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
4
votes
1answer
786 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 ...
2
votes
1answer
624 views

Collision in PyGame for spinning rectangular object.touching circles

I'm creating a variation of Pong. One of the differences is that I use a rectangular structure as the object which is being bounced around, and I use circles as paddles. So far, all the collision ...
1
vote
1answer
683 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) it'...
0
votes
2answers
279 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 ...
5
votes
4answers
1k 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 ...
0
votes
1answer
36 views

Speed after an angled collision?

I can calculate the speed when there is no angle, but I can't calculate the speed when it is angle. Physics paramaters: ...
0
votes
2answers
74 views

How to make planets “stay together” on collision

I working on a 2D planetary orbit simulator and I've encountered a problem regarding the collision of planets. Currently, here is what I have ...
0
votes
2answers
96 views

Collision stickyness problem on multiple inputs

I've been trying for a couple of days to solve an issue I'm having with top-down 2D collisions, whenever I collide with tiles that have adjacent collidable tiles my player sticks to the wall, If I ...
1
vote
1answer
50 views

Box collisions between vehicles in traffic pattern

I'm working on a traffic simulator. Right now, I have ways to manage 4-way stop intersections and a solution for efficiently determining which vehicles are colliding with one another. All vehicles ...
-1
votes
0answers
20 views

3D sphere vs sphere collision resolve problem

I have been watching OneLoneCoder video about circle collision resolve and use the code from git. But the code is for 2D case, i.e. circles, and I need a solution for spheres. So I tried to add Z-...
1
vote
1answer
47 views

SAT Collisions: Resolving rotations

Currently I have a working 2D SAT collision system with only boxes, but works with static rotations as well, leaving room for triangles. One of the issues I've been able to resolve was tunnelling, ...
1
vote
0answers
41 views

Simple collision resolution in a platformer game

I want to make a 2d platformer with moving, jumping and wall sliding. How can I make a simple pleasant collision resolution system that works for the following rectangles. Player is red, platform is ...
0
votes
1answer
73 views

Godot: How do I create a temporary invincible state or invincibility frames?

My issue I have been racking my head around how to achieve invincibility frames. Working in the Godot Engine I have considered a few methods for this: Setting a Timer Node when damaged to trigger the ...
3
votes
1answer
244 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
1answer
66 views

Detecting a Collision Between Two Bodies Undergoing Multiple Transformations

I have been searching for an answer to this for a really long time and I have not found any definitive answers as of yet. What I am trying to do is determine if and when two bodies collided between ...
1
vote
1answer
3k views

2D OBB collision detection, resolving collisions?

I currently use OBBs and I have a vehicle that is a rigid body and some buildings. Here is my update() ...
0
votes
1answer
47 views

How to improve the charactercontroller for jumping?

I have an issue with my character controller, when I jump, it sometimes lands on surfaces it shouldn't be able to land on, like very steep slopes etc (even though my max slope is 45 deg). In this case,...
0
votes
1answer
57 views

Super mario bros “rounded” tile collision detection

I'm working on a Mario bros clone with SDL and C++ (purely for educational porpuses / and for fun) I got collision detection working by using AABB collision detection and resolving one axis at a time: ...
0
votes
0answers
20 views

Pygame Collision | Why do I slide up walls in my tile based game?

My player if in contact with a wall either left/right/top(head) they will be able to just continue in the Y direction if you press jump as if you were flying. This is for all walls and invisible walls ...
0
votes
2answers
598 views

Dragging a Rigidbody2D without passing through obstacles

I have this body of code written for an object that needs to be an obstacle and another object that is draggable. I have colliders on both and a kinematic rigidbody on the draggable object, but the ...
0
votes
1answer
82 views
0
votes
1answer
31 views

How to move player out of multiple penetrating colliders?

The player in my game can teleport like Noctis from ffxv.The player shots a weapon projectile and then teleports to the projectile. I'm using raycast to calculate the weapon position after thrown. ...
0
votes
2answers
185 views

How to use separating axis theorem to allow for sliding along walls

I'm making a 2D platformer game and using the separating axis theorem for collision detection, but I want the player to be able to walk along the ground and slide on walls and other stuff and I can't ...
0
votes
1answer
88 views

Topdown Game Collision Detection

I am working on a simple game with topdown movement, but I am unable to get the collisions to work properly. I know the collision detection itself works, but the constraining of the player is where I ...
3
votes
1answer
394 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 ...
1
vote
1answer
65 views

Problem with diagonal collision response using PyGame

So I have been having this problem for the last few days and it has me really frustrated. What I am trying to do is resolve collisions with custom hitboxes in PyGame and it looks something like this: ...
1
vote
1answer
1k 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 ...
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 ...
0
votes
0answers
51 views

OnActorHit not calling hit function in Unreal Engine

I am trying to make a pong game in a 3D landscape. I want to make the ball bounce around the box or the Pong pad. But the ball just goes through the walls and pad, but the pad collides with the walls. ...
0
votes
0answers
22 views

How can I prevent two rectangles from overlapping?

I have two rectangles defined by their respective left, right, top and bottom. I'm trying to prevent the collisions for these two rectangles but I cannot find a working solution. I am obtaining the ...
0
votes
0answers
52 views

Help with Minecraft-like AABB-AABB collision detection and resolution

I am currently working on a Minecraft like game with OpenGL and C++. I've gotten as far as abstracting a Camera object and setting up movement and even defining basic gravity like simulations, but I ...
1
vote
1answer
33 views

Implementing a movement and collision system with Vectors and Area

I've scoured gamedev for around 45 minutes, but I'm unable to find a detailed approach to implementing a movement and collision system for games - specifically, when to use which process, and what to ...
0
votes
0answers
57 views

Pong paddle and deflection angles

I'm trying to make a pong clone and am having trouble grasping ball deflection. The way I'm approaching it is to increase the angle by how far the ball collides from the middle of the paddle. However, ...
0
votes
0answers
26 views

Calculate Collison Point (approximation) between two oriented bounding boxes [duplicate]

I implemented the separating axis theorem to detect collisions between two oriented bounding boxes (which is working fine). To do the collision handling, I am required to calculate the collision ...
0
votes
0answers
25 views

Pushing an object on other colliders makes the pusher object go through

The Wall moves to the right and pushes the Character with it. The character travels along a bunch of Blocks with colliders attached to them. This is the result: At some point, the Character gets ...
6
votes
5answers
13k 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 ...
0
votes
1answer
51 views

Way to Reset Varible After Collision Resolution

I have some code that, if a player is in contact with the wall, prevents the player from moving. Is there any way with this code to reset the collide variable, and if not, what would be the simplest ...
1
vote
1answer
54 views

2D Collision detection: rewinding to moment of first intersection

I am working on a collision system in a Platformer tile-based game. All tiles are AABB. I am trying to implement "Rewind to Moment of First Intersection" mentioned in this post's second point. The ...
0
votes
0answers
55 views

High speed collision detection using separating axis theorem

I’m using the SAT and the minimum translation vector from it to detect and handle collision in my 2D game. It works great for regular speeds, (i.e. when the speed is low enough so that an object doesn’...
0
votes
0answers
45 views

RigidBody Collision Handling with Verlet Integration

Hi I'm reading the Jakobsen Paper "Advanced Character Physics" which explains how the verlet integration along with a tetrahedron (4 particles) can form a structure usable for rigidbody (with 6 length ...
0
votes
1answer
28 views

Way to Get Collision Box Width Gamemaker

I was coding the wall collision system for my game, and I wanted to do it using intersect boundaries instead of checking every step if they are off the screen. When the player crosses the boundary ...
0
votes
0answers
26 views

Numerical errors in Player collision offset causing player to fall through the ground the next frame, how to avoid?

I'm trying to implement player physics with arbitrary objects, in this case, a bunch of cubes. I wanted to add a "floor" so in my cube collision function, I added the following following lines: <...
1
vote
2answers
97 views

2D game with collision detection, and I need help with how to resolve a collision

At the moment I have built a custom Vector2 class and have a character object that has an acceleration vector (modified by vector forces), a velocity, and a position as well as bounding boxes for ...
1
vote
2answers
114 views

How To Resolve Collision Before it Occurs

I have 2 objects, A and B, in a 2 dimensional space. If I know A is trying to move by vector M (that is to add vector M to the positional vector of A), and that A will collide with B after A moves, ...
-1
votes
1answer
293 views

XNA 2D vehicle wall collisions

I am attempting to implement collisions for my truck game, where the truck can drive around the world and hit walls surrounding the level and various randomly placed walls within the level. I am able ...
0
votes
0answers
103 views

Moving point (as line)-Polygon collision detection

i've reached a good point with my engine, with static/instant collision detection and callbacks in case of collision. By instant collision detection i mean: Object A moves from x1y1 to x2y2 Check if ...
0
votes
0answers
22 views

Stop the player to prevent it from being thrown away after collision

I'm trying to write a script where when the player (kinematic) comes up against an enemy he stops, jumps and gets dynamic again. The problem is that when it returns dynamic it is thrown away and does ...
0
votes
0answers
83 views

What is wrong with my collision detection?

I am trying to create a collision detection system between block using this code: ...
0
votes
1answer
143 views

What to do with collision detection?

I am able to get collision detection (CD) into my game but... what do I do with it? Do I push the player back to the last location? Something else? I am programming the game in C++ using the Irrlicht ...
3
votes
2answers
233 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 ...

1
2 3 4 5
8