A process of adjusting game objects position after collision.

learn more… | top users | synonyms

0
votes
1answer
100 views

Collision between a sphere and a mesh(height-map)

I am trying to implement a method that detects the collision between a sphere and a mesh and reflects the vector of speed. I have a method, that detects a collision between a sphere and a triangle and ...
0
votes
1answer
196 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 ...
0
votes
1answer
51 views

2D Collision Response

I am trying to implement collision response in my libgdx game. I'm using Rectangle objects as my bounbing boxes. This makes collision detection very easy, however I can't quite get the response ...
1
vote
3answers
70 views

Collision Detection/Response Issues in Unity

Sprite A: Box Collider 2D and Rigidbody 2D. Sprite B: Box Collider 2D. Both sprites have a Sprites/Default material with Pixel Snap enabled. The textures being used are set to Truecolor Format and ...
3
votes
2answers
1k 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
2answers
114 views

Collision Response in Entity Components Systems

This question seems to be a duplicate of mine, but I don't think it is. I'm trying to build a game using an ECS, but I want this ECS to be as simple as possible, therefore I am eschewing messages. ...
0
votes
1answer
21 views

Collision resolution moving Point to AABB with raycasting

This is probably trivial, but I'm having trouble making it work. I have a 3-coordinate world of particles simulated with Verlet Velocity. I only care for collision between their centers and a few ...
0
votes
1answer
156 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
2answers
178 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
vote
1answer
83 views

How to calculate faces involved in collision (Separating Axis Theorem)

I have a game engine created in javascript (https://jsfiddle.net/4gqsq8wf/) which uses collision detection via the Separating Axis Theorem. Currently, it does not have any means of resolving velocity ...
1
vote
3answers
72 views

Collision response and delta-time problems

I'm working on a 2d top-down shooter game. At the time, I am trying to get the movement and collision right, but I have a few problems with this. First of all, I am making my game frame independent ...
0
votes
1answer
367 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 ...
0
votes
1answer
104 views

AABB collision resolution issues

I'm trying to make a character collide with some tiled terrain. I have an issue with the collision resolution, and after days of shooting in the dark ant not finding any relevant help online, I'm no ...
1
vote
1answer
34 views

QuadTree Checking Collision With Different Levels of Nodes

I am making a QuadTree for a 2D Platformer. Researched on it and I managed to make a pretty good one where each node stores its 4 SubNode and there's a MAX_OBJECTS for each Node and MAX_LEVELS which ...
5
votes
1answer
165 views

Circle Collision Resolution and Angular Momentum

I have a 2D engine working pretty well that involves rectangles and circles. I just reworked parts of the collision detection/response system for better handling of angular speed/momentum. The ...
2
votes
2answers
67 views

2D multiple circle collision response

I'm trying to implement simple 2D circle collision system. There are circles with different radiuses and velocities (the larger the circle the slower it is). Contrary to all the questions on the ...
1
vote
1answer
305 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
0answers
30 views

XNA 2D Tile Baseed Map Collision Messing Up On Inside Corners

I'm creating a 2D Over the head game and the collision system works fine for straight walls and outside corners although not for inside corners. The walls are done by each solid tile having a ...
1
vote
1answer
66 views

Sliding DOOM style collision resolution against arbitrary 2D geometry

I've been working on a HTML5 canvas raycasting engine for the web browser, with the end goal of making a simple FPS game in the style of the early 90s. The engine sits somewhere between Wolfenstein 3D ...
2
votes
1answer
76 views

How does matrix based game physics (collision detection & response) work?

I'm familiar with how to do collision detection and response using shape intersection tests, the separating axis theorem, and by using MPR and GJK with minkowski sums and support vector defined ...
1
vote
1answer
38 views

Objects phasing through each other in physics engine

I'm writing my own physics engine right now (following this tutorial), but I'm running into some problems. Sometimes on collision, objects will just phase through each other instead of bouncing off of ...
0
votes
0answers
22 views

Where to put collision detection and resolution with Verlet Velocity?

I've implemented a 3D Verlet Velocity integrator with variable-velocity forces following this awesome answer: How can I implement gravity? I've used only freely-moving spheres for now, applying ...
1
vote
1answer
39 views

How to go about an intermediate collision resolution system?

I would like to know a better way of collision resolution than I am currently doing. My current collision system stores the current positions and previous positions of each object. When an object ...
1
vote
1answer
57 views

How can I determine “exact moment” of collision with ray casting?

I'm currently brainstorming how the physics for my game engine is going to be handled. It's top down and I'm thinking of using ray casting for collision detection. I've reached two potential problems ...
1
vote
1answer
36 views

How to resolve collisions when using ray-casting to predict the location of future collisions?

I ran into a question I can't seem to solve, while implementing the movement/ collision checking code for my game. The game is in 2D and all objects in my game use either AABBs or circles as collision ...
1
vote
1answer
51 views

Using Farseer Physics, how can I get objects to bounce at the correct angle

I am using the Farseer Physics engine in my MonoGame project. I have static walls which have "body" friction 0 and "body" restitution 1. I have dynamic objects, which are circles, with "body" friction ...
0
votes
1answer
430 views

Separating axis theorem implementation flaky minimum translation vector based on triangle orientation

I've implemented some collision detection using separating axis theorem. Works fine for axis-aligned rectangles and two out of four possible right triangle orientations. For some reason when the ...
0
votes
1answer
52 views

Circle Depth Penetration

I'm resolving some collision between circles and I keep getting this problem. Note: The rectangles are perfect squares fitting the circles so when I type rect.Width I mean the radius of the circle. ...
1
vote
0answers
39 views

Implementing Separating Axis Theorem to Detect and Handle Sliding Collisions

I am having a bit of difficulty detecting collisions properly with separating axis theorem. My code seems to be giving a lot of false alarms. Also, I've looked into implementing sliding collisions ...
4
votes
1answer
223 views

2D Collision response - rotating, moving polygon hitting a wall

I'm trying to bounce a polygon that has both velocity and angular velocity off a (immovable) wall when one of the vertices collides with it. I can detect the collision, and I've worked out how to ...
4
votes
4answers
463 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
65 views

My sprites do not always respect collisions in Pygame

I have a Player sprite (40x40 pixels) and Tiles (20x20 pixels) which build the terrain. At the 4 edges there are 2 rows or columns (depends on vertical or horizontal) of wall tiles. Those are the ...
0
votes
2answers
116 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
22 views

JBullet - Object is colliding at the wrong location!

I'm trying to make archers walk on my ship. I create the ship mesh like this: { Model mesh = null; try { mesh = OBJLoader.loadModel(new File("res/ship.obj")); } ...
1
vote
2answers
157 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 ...
1
vote
1answer
122 views

Rigidbody physics concept: Why translate collision shape on-the-fly instead of mutating it?

Crossposting at http://stackoverflow.com/questions/29993547/rigidbody-physics-concept-why-translate-collision-shape-on-the-fly-instead-of-m I've spent some time going through physics engine's ...
0
votes
0answers
40 views

How to use collision masks and overlap_area in pygame?

So, I've been prototyping a game, and I've been using sprite collision, and it's not cutting it any more. I read up on the documentation about masks and overlap area: ...
3
votes
2answers
113 views

How do I calculate rotational impulses in rigid body collisions?

I'm writing a simple 2D physics engine to help me understand the inner workings of physics engines. I'm following Randy Gaul's tutorial which can be found here and It's been extremely useful and ...
0
votes
0answers
49 views

How to calculate multiple collision of sphere and triangles?

I have a sphere and a mesh(triangles). When the sphere intersects the triangle, I reflects the vector of speed and everything works fine. But I can't write a good implementation for multiple ...
0
votes
0answers
36 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, ...
1
vote
0answers
38 views

Collision callbacks in a javascript engine [closed]

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 ...
3
votes
1answer
218 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
2answers
106 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
50 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
128 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 ...
-1
votes
1answer
59 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 ...
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
vote
0answers
55 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. ...
1
vote
3answers
350 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 ...
0
votes
1answer
42 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 ...