The determination of whether or not two or more entities make contact with each other during gameplay.

learn more… | top users | synonyms (2)

4
votes
4answers
600 views

Point of contact of 2 OBBs?

I'm working on the physics for my GTA2-like game so I can learn more about game physics. The collision detection and resolution are working great. I'm now just unsure how to compute the point of ...
2
votes
1answer
141 views

Finding the normals of an oriented bounding box?

Here is my problem. I'm working on the physics for my 2D game. All objects are oriented bounding boxes (OBB) based on the separate axis theorem. In order to do collision resolution, I need to be ...
1
vote
1answer
369 views

Detecting pixels in a rotated Texture2D in XNA?

I know things similar to this have been posted, but I'm still trying to find a good solution... I'm drawing Texture2D objects on the ground in my game, and for Mouse-Over or targeting methods, I'm ...
7
votes
3answers
648 views

Collision Detection Game Design and Architecture

I've reading some articles about collision detection. My question here is about ideas on the design for it. Baically I have a C++ game that has a main loop with entities with an update method. Based ...
0
votes
1answer
216 views

Normalizing the direction to check if able to move

i have a a room with 4 walls along the x and z axis respectively. My player who is in first person (therefore the camera) should have collision detection with these walls. I'm relatively new to this ...
0
votes
0answers
427 views

What is the best way to implement collision detection using Bullet physics engine and a track generated from a curve?

I am developing a small racing gam, the track is generated from a curve. As said above, the track is generated, but not infinite. The track of one level could fit with no problem in memory and will ...
1
vote
1answer
917 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() private void update() { camera.setPosition((vehicle.getPosition().x * camera.getScale()) - ...
3
votes
3answers
286 views

How to choose cell to put entity in in an uniform grid used for broad phase collision detection?

I'm trying to implement the broad phase of my collision detection algorithm. My game is an arcade game with lot of moving entities in an open space with relatively equivalent sizes. Regarding the ...
3
votes
1answer
260 views

Moving the jBullet collision body to with the player object

I am trying to update the location of the rigid body for a player class, as my player moves around I would like the collision body to also move with the player object (currently represented as a ...
11
votes
3answers
3k views

Faster 2D Collision detection

Recently I've been working on a fast-paced 2d shooter and I came across a mighty problem. Collision detection. Sure, it is working, but it is very slow. My goal is: Have lots of enemies on screen and ...
-2
votes
1answer
248 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 ...
2
votes
1answer
97 views

Hit Detection When rotating the camera

This bug/feature has been plaguing me for a while and i want to know the best way to fix it. I'm testing simple hit detection with a wall, like: if (Forward button) if(Inv.w.z < -49 || ...
-2
votes
1answer
349 views

C# XNA 2D Multiple boxes collision detection and movement

Hi, I've been making simple game where you shoot boxes that are coming towards you. All game objects are simple rectangles. Now I have problem with collision detection; how to check where the ...
3
votes
1answer
1k views

How a “Collision System” should be implemented?

My game is written using a entity system approach using Artemis Framework. Right know my collision detection is called from the Movement System but i'm wondering if it's a proper way to do collision ...
0
votes
2answers
168 views

Draw Rectangle To All Dimensions of Image

I have some rudimentary collision code: public class Collision { static boolean isColliding = false; static Rectangle player; static Rectangle female; public static void collision(){ Rectangle ...
0
votes
1answer
478 views

Platform game collisions with Block

I am trying to create a platform game and doing wrong collision detection with the blocks. Here's my code // Variables GTimer jump = new GTimer(1000); boolean onground = true; // The update method ...
1
vote
2answers
414 views

Circle vs Edge collision detection / resolution [closed]

I made a javascript class Ball.js that handles physics interactions betweens balls as well as painting. In the v1.0, the ball vs ball collision detection and resolution is well handled. In the next ...
2
votes
3answers
441 views

Box2d too much for Circle/Circle collision detection?

I'm using cocos2d to program a game and am using box2d for collision detection. Everything in my game is a circle and for some reason I'm having a problem with some times things are not being detected ...
1
vote
1answer
247 views

Fixing a collision detection bug in Slick2D

My game has a bug with collision detection. If you go against the wall and tap forward/back sometimes the game thinks the speed you travelled at is 0 and the game doesn't know how to get you out of ...
2
votes
1answer
389 views

High CPU usage on Pong clone

I just made my first game, a clone of Pong, using OpenGL and C++. But its using ~50% of the CPU, which I guess is very high for a game like this. How can I improve that? Can you please look up my code ...
0
votes
1answer
167 views

jBullet Collision/Physics not working as expected

Below is the code for one of my objects in the game I am creating (yes although this is a cube, I am not making anything remotely like MineCraft), and my issue is I while the cube will display and is ...
1
vote
5answers
591 views

Error in my Separating Axis Theorem collision code [closed]

EDIT 2: Made some more alterations, now the one area i'm still confused on is: how to work out the vector to project on the separation axes? My projectOnto(..) method has some huge gaps now and i know ...
0
votes
2answers
574 views

Collision detection on a 2D hexagonal grid

I'm making a casual grid-based 2D iPhone game using Cocos2D. The grid is a "staggered" hex-like grid consisting of uniformly sized and spaced discs. It looks something like this. I've stored the grid ...
0
votes
1answer
264 views

How to collide with a 45degree wall in XNA

I want to make a PAC MAN imitation game to start working on AI, and while my first version will feature rectangles with widths or heights of 1 to makes walls for collision detection, I want to ...
6
votes
1answer
2k views

Why doesn't Unity's OnCollisionEnter give me surface normals, and what's the most reliable way to get them?

Unity's on collision event gives you a Collision object that gives you some information about the collision that happened (including a list of ContactPoints with hit normals). But what you don't get ...
2
votes
1answer
4k views

Collision detection, stop gravity

I just started using Gamemaker Studio and so far it seems fairly intuitive. However, I set a room to "Room is Physics World" and set gravity to 10. I then enabled physics on my player object and ...
8
votes
1answer
2k views

Fast, accurate 2d collision

I'm working on a 2d topdown shooter, and now need to go beyond my basic rectangle bounding box collision system. I have large levels with many different sprites, all of which are different shapes and ...
1
vote
1answer
1k views

Making an efficient collision detection system

I'm very new to game development (just started 3 months ago) and I'm learning through creating a game engine. It's located here. In terms of collision, I know only brute-force detection, in which ...
1
vote
1answer
302 views

Color based collision detection

I am making a game where you fly a ship around some randomly generated planets. Since I am using a for loop to draw over 5000 planets, using the rectangle class or an oval-type class for this is not ...
5
votes
2answers
137 views

how to keep display tick rate steady when using continuous collision detection?

(I've just found about this forum). I hope it is ok to repost my question again here. I posted this question at stackoverflow, but it looks like I might get better help here. Here is the question: ...
1
vote
1answer
1k views

Unity Particle System collision detection problem

I'm using Unity 3.5.5f3 wich has the Shuriken particle system. I've made a blood particle system based on Unity's demos. (Exploding paint [Blood]) The blood is flowing and when it collides with a ...
3
votes
3answers
422 views

How to design 2D collision callback methods?

In a 2D game where you have a lot of possible combination of collision between objects, such as: object A vs object B => object B vs A; object A vs object C => object C vs A; object A vs object D ...
0
votes
2answers
508 views

Circle physics and collision using vectors

This is a problem I've been having, When making a set number of filled circles at random locations on a JPanel and applying a gravity (a negative change in the y), each of the circles collide. I want ...
2
votes
3answers
1k views

Game physics / 2D Collision detection AS3

I know there are some methods you can use like hittestPoint and so on, but I want to see where my movieclip colliedes with another another movieclip. Any other methods I can use? by any chance does ...
4
votes
2answers
875 views

XNA 2D Rotated Rectangle Collision Response

I am using Rotated Rectangles which collide using the Separating Axis Theorem and they work perfectly fine for collision detection using Intersects and Contains. However, I am starting to use faster ...
-1
votes
3answers
1k views

XNA how to make wall collision

Hi there i have collision detection but i dont know how to stop object after collision and then move backward for example any ideas ?
1
vote
2answers
301 views

Randomly spawning bitmaps on cnvas

I need some ideas in order to finish algorithm. I'm randomly placing objects (bitmaps) on canvas without overlapping. Time needed to finish it is my problem. When I need to spawn for example 80% of ...
2
votes
1answer
638 views

Trouble with AABB collision response and physics

I have been racking my brain trying to figure out a problem I am having with physics and basic AABB collision response. I am fairly close as the physics are mostly right. Gravity feels good and ...
2
votes
3answers
461 views

OpenGL Get Rotated X and Y of quad

I am developing a game in 2D using LWJGL library. So far I have a rotating box. I have done basic Rectangle collision, but it doesn't work for rotated rectangles. Does OpenGL have a function that ...
1
vote
0answers
158 views

Updating physics for animated models

For a new game we have do set up a scene with a minimum of 30 bone animated models.(shooter) The problem is that the update process for the animated models takes too long. Thats what I do: Each ...
5
votes
1answer
1k views

Circle-Rectangle collision in a tile map game

I am making a 2D tile map based putt-putt game. I have collision detection working between the ball and the walls of the map, although when the ball collides at the meeting point between 2 tiles I ...
1
vote
1answer
803 views

Java 2D Tile Collision

I have been working on a way to do collision detection forever, and just can't figure it out. Here's my simple 2D array: for (int x = 0; x < 16; x++) { for (int y = 0; y < 16; y++) { ...
2
votes
1answer
177 views

2D SAT How to find collision center or point or area?

I've just implemented collision detection using SAT and this article as reference to my implementation. The detection is working as expected but I need to know where both rectangles are colliding. ...
2
votes
1answer
148 views

Change collision action

I have a collision detection and its working fine, the problem is, that whenever my "bird" is hitting a "cloud", the cloud dissapers and i get some points. The same happens for the "sol" which it ...
1
vote
1answer
339 views

Simple (and fast) dices physics

I'm programming a throw of 5 dices in Actionscript 3 + AwayPhysics (BulletPhysics port). I had a lot of fun tweaking frictions, masses etc. and in the end I found best results with more physics ...
7
votes
3answers
2k views

Collision detection with curves

I'm working on a 2D game in which I would like to do collision detection between a moving circle and some kind of static curves (maybe Bezier curves). Currently my game features only straight lines ...
0
votes
2answers
940 views

Collision between sprites in game programming?

I've since just started coding for an android game using eclipse. I've read Beginning Android Game Programming and various other e-books. Recently, I've encountered a problem with collision between ...
0
votes
2answers
495 views

Calculate the intersection depth between a rectangle and a right triangle

all. I'm working on a 2D platformer built in C#/XNA, and I'm having a lot of problems calculating the intersection depth between a standard rectangle (used for sprites) and a right triangle (used for ...
3
votes
3answers
174 views

Collision and Graphics integration

I'm a little confused about the integration between collision and graphics. They both need to share the same position in the world. The most obvious choice is the center of the entity, which is good ...
2
votes
1answer
762 views

Collision Detection for a 2D RPG

First of all, I have done some research on this topic before asking, and I'm asking this question as a mean to get some opinions on this topic, so I don't make a decision only on my own, but taking ...