Questions tagged [collision-resolution]

A process of adjusting game objects position after collision.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 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
0answers
23 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, ...
0
votes
2answers
523 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
81 views
0
votes
1answer
40 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
1answer
29 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
179 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
87 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
370 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
49 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 ...
0
votes
0answers
15 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: ...
4
votes
1answer
778 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
619 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
681 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
272 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 ...
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 ...
5
votes
5answers
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
0answers
26 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
2answers
93 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
43 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 ...
0
votes
0answers
19 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
39 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
61 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
29 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
53 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
25 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
12k 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
53 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
54 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
43 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
94 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
113 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
94 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
134 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
226 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
0answers
103 views

Unity Tilemap collider stopping player's movement [duplicate]

I am using tilemap collider to create collision between my world tilemap and the player, but sometimes when the player runs on the tilemap, it stops the player's movement and kind of makes it look ...
0
votes
1answer
370 views

How to make a ball move with constant velocity after a collision?

In my scene there is a player and a ball a few units above the ground. The ball has a rigidbody2D attached with zero gravity. I built a "cage" with square sprites to simulate the edges. I would like ...
0
votes
1answer
321 views

Terrain collision with sphere and OBB

I'm implementing my physics engine for my 3D game. So far I've been able to implement collision detection between OBB, spheres and planes. The engine generate contacts and resolve them with an ...
0
votes
2answers
261 views

2d Rectangle Collision Resolution: Find rollback point

I have a 2-part question: 1: I have 2 rectangles, A and B. B is a wall and A is moving. My simple logic here is every time A moves, it moves based on some (x,y) offset and then checks if it collided ...
1
vote
0answers
28 views

Polygon doesn't bounce enough in edge-ground collisions (but it does in vertex-ground collisions)

I'm currently making a (basic) physics engine in Python in which I want a polygon to bounce off the ground (\$y=0\$). When a vertex hits the ground, I apply the (linear) impulse $$\overrightarrow{P}...
3
votes
1answer
287 views

How do I apply angular velocity vector after a collision?

I'm writing a small 3D physics engine, and I am trying to get the angular velocity vector of two shapes, specifically two cubes. For deeper understanding I have divide the motion to linear and ...
0
votes
0answers
9 views

Physics Collision Resolving with Estimated Rotation

So I have a Sphere that I want to simulate simple estimated physics on it. I substepping with trace to find collisions, once I have the collision I can query Collision Location and Tangent - based on ...

1
2 3 4 5
7