A process of adjusting game objects position after collision.
-1
votes
2answers
251 views
My 2D collision code does not work as expected. How do I fix it?
I have a simple 2D game with a tile-based map. I am new to game development, I followed the LazyFoo tutorials on SDL.
The tiles are in a bmp file, but each tile inside it corresponds to an internal ...
0
votes
1answer
249 views
Collision detection with multiple polygons simultaneously
I've written a collision system which detects/resolves collisions between a rectangular player and a convex polygon world using the Separating Axis Theorem. This scheme works fine when the player is ...
0
votes
1answer
250 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
votes
1answer
203 views
Pixel perfect collisions for platforms
i'm trying to do a pixel perfect collision but i don't know how to handle collisions when there is a jump . Here i have one image of a sample map:
But maybe I've done a bad supposing all pixel like ...
-2
votes
1answer
85 views
collision between two objects
to test collision i am using intersect function.
if(this.getBounds_ball().intersects(this.getBounds_rect()))
{
but the problem is i dont know how to test where the ball is collision from.
i was ...
1
vote
0answers
49 views
Collision repositioning/resolution help
I've been having a trouble with moving objects out of the hitboxes they've just collided with.
Here is my (relevant) code so far:
Vector2 oposo = other.position;
Vector2 poso = ...
1
vote
0answers
94 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
0answers
61 views
how to project a collision between a pair of polygons under rotation?
I am trying to create a physically plausible 2d physics engine. I have read many documents about detection of collisions, contact resolving, interpenetrations, projection, separating axis theorem ...
0
votes
0answers
33 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 ...
0
votes
0answers
65 views
Collision Detection and Resolution in Three.js
So at the moment am making a simple game using three.js and three.firstpersonControls.js but with the current Three.js r66, they apparently removed checkWallCollision and then in the r67 ...
0
votes
0answers
70 views
Realistic collisions with a kinematic rigidbody?
I have a car game where player drives a car; this car has a collider and a kinematic rigidbody attached and is completely controller by script (i.e. a script sets its position and rotation). In the ...
0
votes
0answers
86 views
Minkowski sum for circle + rectangle collision resolution (which 'side' was hit)
This question, on determining which side a rectangle has collided on (with another rectangle) has been a great help in writing my collision resolution code. However, I'm dealing with a circle and a ...
0
votes
0answers
108 views
Polygon Collision Response
I'm working on a game engine that has a built in custom physics engine (I know it's a waste of time, but I have years to make this, so why not make it good?).
Currently, with any number of polygons, ...
0
votes
0answers
466 views
Alternative to unity's character controller
I wonder what you guy would do for a cheap replacement of character controller in unity. I try a bunch of implementation and they don't work at all, what I'm doing wrong?
I'm trying to make a game ...
0
votes
0answers
298 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
0answers
161 views
Simulating smooth movement along a line after calculating a collision containing a restitution of zero in 2D
[for tl;dr see after listing]
//...Code to determine shapes types involved in collision here...
//...Rectangle-Line collision detected.
...
-1
votes
0answers
13 views
Understanding the use of MTV for an elastic collision response
So, I'm trying to simulate polygon physics, both linear and angular.
To calculate the MTV is easy in SAT (Minimum Translation Vector), and to use it to adjust position is also easy:
PolygonA.center ...