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

learn more… | top users | synonyms (2)

2
votes
4answers
4k views

How do I detect pixel-level collision using andEngine?

I'm developing a game for Android using andEngine, and I need to detect collisions only when two objects visually collide (not in blank space of the image). In J2ME, I'm able to do that using ...
2
votes
2answers
918 views

Tile based map and collision; getting stuck

I'm trying to make my character move around a tile map with collisions. Everything works fine except for one thing. I show you a picture with the problem: http://i.stack.imgur.com/ZWI7x.jpg That is, ...
2
votes
3answers
2k views

2d Collision detecton axis aligned boxes

I have recently run into some trouble with my collision detection. My game is composed of a map made out of axis aligned squares. The player has an x and y velocity, and I want to know how I can find ...
2
votes
4answers
3k views

per pixel based collision detection

I was wondering if anyone had any ideas on how to get per pixel collision detection for the android. I saw that the andEngine has great collision detection on rotation as well but couldn't see where ...
1
vote
0answers
206 views

How to identify whether the boundingvolume intersects with walls or floor when it doesnt return normals?

My game in jMonkey is the kind that use will have to place objects in a scene (which consist of walls and slabs and floor). All my models are centered at origin. When the user click a point I use ray ...
1
vote
2answers
642 views

How to check for cube collisions?

I want a method, which takes two "ObjectBox" objects (A "ObjectBox" has .getX() .getY() .getZ() .getSizeX() .getSizeY() .getSizeZ() methods) as a parameter and return true if the two Boxes are ...
1
vote
2answers
281 views

Fast 2D collision detection in an unbounded space

I'm trying to do collision detection on a large number of entities of greatly varying size in an unbounded space. The entities are circles, so it's relatively easy to check if two are colliding. ...
1
vote
0answers
190 views

Detect Sprites, they are in Shape or Not which random draw in Cocos2d

I have searched a lot on web and found some of help ful links as exact my question. Link 1 Link 2 But still i am not success to achieve this, i have done some of code lines, as like draw line by ...
1
vote
1answer
365 views

How do I get the axes for SAT collision detection

In SAT collision detection how do I calculate the axes for projection?
1
vote
1answer
377 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 ...
1
vote
2answers
367 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 ...
1
vote
2answers
301 views

Boolean checks with a single quadtree, or multiple quadtrees?

I'm currently developing a 2D sidescrolling shooter game for PC (think metroidvania but with a lot more happening at once). Using XNA. I'm utilising quadtrees for my spatial partitioning system. All ...
1
vote
3answers
1k views

Checking for collisions on a 3D heightmap

I have a 3D heightmap drawn using OpenGL (which isn't important). It's represented by a 2D array of height data. To draw this I go through the array using each point as a vertex. Three vertices are ...
1
vote
0answers
164 views

Farseer Physics EndContact events don't fire for all registered delegates

Here's my situation: I have several objects that contain a body and a fixture. They are set to sensor = true; atmosphere = BodyFactory.CreateCircle(world, atmosphereRadius / Level.METER_IN_PIXELS, ...
1
vote
1answer
2k views

How can I cancel a contact in a b2ContactListener?

To know when contacts happen we can derive from b2ContactListener and implement our own solution which is great. I'm wondering is there anyway we can cancel a contact, that is to say when we hit begin ...
1
vote
1answer
240 views

How can I know in which direction 2 balls will go in billiard game?

When a ball is struck, how can we know in which direction both balls will go when ball is struck? I know the angle at which the ball strikes the other ball matters, but how can we calculate that ...
0
votes
1answer
879 views

Platformer raycast collision detection

I'm using Unity to create a 2D platformer. For collision detection, I'm using raycasting to detect any possible collisions with specific collision layers, and adjusting the desired delta x & y ...
0
votes
2answers
99 views

Floating point precision issue with Box2D

I'm using Box2D and I am putting edge tiles as b2Bodies so that the tile world can have physics: The problem is that there are 3 b2_kinematic bodies under the player right beside each other. Every ...
0
votes
1answer
175 views

Collision Detection Code Structure with Sloped Tiles

Im making a 2D tile based game with slopes, and I need help on the collision detection. This question is not about determining the vertical position of the player given the horizontal position when on ...
0
votes
2answers
2k views

Java collision detection with rectangles

I'm trying to get the collision between two squares. I've made a Rectangle object that overlays each one and updates the position every tick. Then I made a collision method that checks whether they ...
0
votes
1answer
201 views

Bounding Boxes and XNA

So heres some straight up code for you: BoundingBox b = new BoundingBox( Vector3.Up + Vector3.Right + Vector3.Forward, Vector3.Down + Vector3.Backward + Vector3.Left); BoundingBox bb = new ...
0
votes
2answers
180 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
156 views

Gravity stops when side-collision detected [closed]

Please, look at this GIF: The label on the animation says "Move button is pressed, then released". And you can see when it's pressed (and player's getCenterY() is above wall getCenterY()), gravity ...
0
votes
1answer
157 views

Binding BoundingSpheres to a world matrix in XNA

I made a program that loads the locations of items on the scene from a file like this: using (StreamReader sr = new StreamReader(OpenFileDialog1.FileName)) { ...
0
votes
2answers
3k views

Basic 3D Collision detection in XNA 4.0

I have a problem with detecting collision between 2 models using BoundingSpheres in XNA 4.0. The code I'm using i very simple: private bool IsCollision(Model model1, Matrix world1, Model model2, ...
0
votes
2answers
453 views

Collisions not working as intended

I'm making a game, it's a terraria-like game, with 20x20 blocks, and you can place and remove those blocks. Now, I am trying to write collisions, but it isn't working as I want, the collision ...
-1
votes
1answer
163 views

Grid based Collision Detection between circles [duplicate]

I am working on a 2d arcade game where I have 5 types of circles with different sizes: The ship, the missiles, and 3 types of monsters. This is what it looks like: Currently I'm using brute force ...
-3
votes
1answer
187 views

Simple collision detection implementation [closed]

I'm making a game with C++ where the program extracts the lines out of an image (via openCV), stores them in an std::vector< std::vector< int > > and the builds a tile map out of it which is ...