A process of adjusting game objects position after collision.

learn more… | top users | synonyms

-1
votes
2answers
258 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
61 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
293 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
271 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
216 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
51 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
99 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: ...
0
votes
0answers
21 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 ...
0
votes
0answers
46 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
105 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
101 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
117 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
590 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
316 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
165 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. ...