Collision detection is the determination of whether or not two or more entities make contact with each other during gameplay.

learn more… | top users | synonyms (2)

0
votes
1answer
385 views

Keep running CGRectIntersect Method - Objective C

I have two UIImageViews. mainSprite, and enemy1. And I have a method that makes enemy1 start moving towards mainSprite. So here's that method. -(void)enemy1Aggro{ if ...
5
votes
4answers
3k views

Which Side Was Hit?

I am working on an Android game and I have two objects A and B (both rectangles) and when they collide I simply want to know which side of B was hit. I have detected the collision fine, but I am ...
2
votes
1answer
2k views

Farseer Physics collision detection vs intersection detection with sensors

I'm trying to make a game that uses Farseer physics engine as its main collision detection engine. I have a 2d circle body object that has a matching fixture (I used the CreatCircle method. I did not ...
0
votes
2answers
449 views

Detecting collision between a sprite and many tiles

I have been looking at the following question:- Tile coordinates and am thinking of using this for collision detection in my tile game. The set up in my game is similar to this, in that there is a ...
2
votes
2answers
2k views

physics.addBody() with custom shapes in Corona SDK

Does the physics.addBody() only work with Circles and Rectangles? Or is it possible to physics.addBody() on vector shapes or sprites or with masks or something?
1
vote
2answers
3k views

Box2d and sprites

i have really little practice with box2d, but basically it seems to me that it is possible to attach to every sprite (in a 2d game) a box2d shape (that is, a bounding box enclosing the sprite itself) ...
7
votes
1answer
3k views

How do I calculate collision response between a sphere and a plane?

I'm trying to create a simple 3D game and need to constrain the player within the limits of the game world. When the player hits the sides of the world I want the player's ship to bounce off slightly. ...
1
vote
6answers
778 views

Testing whether two cubes are touching in space

Does anyone have any clean ideas on testing whether two cubes in 3D space touch? By touch I mean, touch at corners or on a face or on an edge. Say that the cubes are axis aligned and there is no ...
8
votes
2answers
3k views

How to handle pixel-perfect collision detection with rotation?

Does anyone have any ideas how to go about achieving rotational pixel-perfect collision detection with Bitmaps in Android? Or in general for that matter? I have pixel arrays currently but I don't know ...
2
votes
2answers
1k views

General 2D Collision Detection Question

Everytime I have coded "working" collision, I always went about it very haphazardly and unstructured. If I use Axis Aligned, or Verlet, Or Euler, any or all of these theories, my problems always lie ...
4
votes
2answers
444 views

Trace with 2D terrain

I currently have some 2D terrain in my game defined by 2D coordinates with lines drawn in between them (linear interpolation too keep it simple). Now I want to cast a ray from anywhere above the ...
1
vote
1answer
466 views

XNA Silverlight 5 3D Model Position

I am use to XNA and starting to learn XNA for Silverlight 5. My Question is that in XNA when you create a Model and load it using content.load you are able to access the models Position, scale etc.. ...
4
votes
2answers
1k views

Designing Efficient 2D Collision for Topdown Shooter

This makes it the first time I'm posting here, so apologies if I stumble over beloved conventions. Currently, I'm trying to figure out how I want to handle collisions for a large number of entities ...
2
votes
1answer
243 views

Box 2d and really complex big shapes

I intended to use jbox2d for my project. But as I went deeper into it's manual I'd found out that it supports dynamic objects between 0.1 and 10 meters (if use scaling and assume that 0.1 is smallest ...
2
votes
2answers
945 views

How do I deal with abstracting collision handling code between entities with differing collision components?

I'm using a component based entity design with Components that hold the data and Systems that act on entities based on the components they have. Entities are registered to all systems as they are ...
1
vote
1answer
673 views

Can't seem to get predictive collision detection working correctly

I am trying to set up the collision detection on a basic 2d game, player clicks a button sprite moves one step int he corresponding direction. Currently all my sprites have the collision rectange ...
0
votes
1answer
430 views

How can I determine which direction a 2D collision is occurring from?

The problem is as follows: Think 2D Zelda (Links Awakening, A Link to the Past) style movement where you can run into walls from any of the four cardinal directions, or basically up, down, left, and ...
-5
votes
2answers
425 views

How can I represent and collide with interior boundaries in a maze?

I'm creating a 2D maze game in Python. When I collide with the walls, the user can go through them but I want to be able to block him from doing that. How do I do this? Would I use an array? I have ...
2
votes
2answers
308 views

Telling which side of a voxel was hit by an object

In XNA, I have an axis-aligned BoundingBox representing the object's hit box, and a Vector3 representing the object's velocity. I also have a stationary 1x1x1 axis-aligned BoundingBox representing a ...
0
votes
2answers
561 views

How do I handle specific tile/object collisions?

What do I do after the bounding box test against a tile to determine whether there is a real collision against the contents of that tile? And if there is, how should I move the object in response to ...
2
votes
2answers
2k views

Designing Collision Detection for 2D Rectangular Adventure/RPG

TLDR: I'm looking for an efficient way to detect collisions between irregular/small objects that are not a full tile size (like small cans) and a free-moving character in a 2D game. I'm planning to ...
2
votes
2answers
899 views

How do I do 3d collisions in isometric game?

I've wondered how to get basic collision detection working in an isometric game. I'm using panda3d which has very comfortable support for bullet, ode and a small builtin physics framework. The problem ...
6
votes
2answers
4k views

Breakout Collision: Detecting the side of collision

I am writing a breakout clone (my first game) and am totally stuck as to how I figure out which side of the brick was hit. I have a collision detection method that looks like this: ...
3
votes
2answers
2k views

Collision Detection problems in Voxel Engine (XNA)

I am creating a minecraft like terrain engine in XNA and have had some collision problems for quite some time. I have checked and changed my code based on other peoples collision code and I still have ...
10
votes
3answers
438 views

Is showing a collision in slow motion computationally relaxing?

In a lot of racing games (Burnout Paradise, for example) when a collision is about to happen, the game play automatically switches to slow motion and carries on in slow sequence until after the ...
5
votes
1answer
4k views

how get collision callback of two specific objects using bullet physics?

I have got problem implementing collision callback into my project. I would like to have detection between two specific objects. I have got normall collision but I want one object to stop or change ...
11
votes
1answer
4k views

How can I define a complex collision area on top of a tile map?

As many people recommended, I am using Tiled map editor to create a map for my game and it's great particularly because libgdx framework also provides with API for maps from Tiled. I understand I can ...
4
votes
1answer
1k views

2D Collision: Check before or check after?

I'm using velocity to move my character, I just add/subtract 0.4f and then update the players position in the update loop. I was wondering, when would be the best place to check for collision? Do I ...
6
votes
0answers
357 views

Rotating platform glitch in a 2D platformer [closed]

So I'm making a tiled platform game in C#/XNA where the whole world is constantly rotating. The huge hurdle was to find out what side of the tile the player was touching, and what angle it was. I ...
5
votes
1answer
7k views

How can I use Rectangle.Intersect() to resolve collisions in XNA?

I have a 2D game written in XNA, and I've been trying to fine-tune my collision resolution. All of my game objects are squares, which means detecting a collision is easy - use the position and the ...
4
votes
1answer
1k views

Are there any good engines for isometric collision detection and platforming?

I've decided to resurrect an old game idea I had years ago. I currently have zero experience with programming, but I'm going to begin studying either C#, Python or both in the near future. The issue ...
4
votes
2answers
1k views

Effects of collisons: broken glass, damaged cars, how are they created?

My question is related in particular to achieving the effects of collision in game engine, how is this done? I have searched a bit, read from the internet and went through a few tutorials, and saw ...
0
votes
2answers
266 views

Effort of impementing interpolation in networked Asteroids

Questions: When we draw with interpolation, where should the collision detection code be? Is it worth implementing interpolation in the following situation? This is for Scrolling Asteroids. I have my ...
9
votes
2answers
2k views

How can I test if a point lies between two parallel lines?

In the game I'm designing there is a blast that shoots out from an origin point towards the direction of the mouse. The width of this blast is always going to be the same. Along the bottom of the ...
2
votes
1answer
1k views

Unity3D animation and world collisions?

I'm using death animation for my enemies but the problem is that when enemy dies he crosses the walls/world. I want enemy/animation to be pushed back into world when he dies (animation is playing). ...
0
votes
3answers
6k views

2D games on Unity and collision detection performance

I'm developing a 2D game for the iOS platform. I have seen a lot of packages on asset store that makes 2D asset creation for unity easier. I have narrowed my selection to just 2, 2d toolkit and ex2d. ...
2
votes
1answer
338 views

How do games using physic engines for 2d games handle platform corners?

I have seen games like latest "2'5D" sonics that handle collision detection at platform corners pretty well. The problem I'm having is that my game uses an ellipsoid as my player's body to let it ...
2
votes
1answer
1k views

2D platformer multiple rectangle collision cause jitter

I posted this question two weeks ago: 2D platformer corner collision and I implemented NoobsArePeople2's solution. Problem is, when player intersects two rectangles that are inside each other, he ...
7
votes
1answer
1k views

MMO Collision detection

I am building a MMO game server for a 2D game and am currently implementing the collision detection, and I am would like to know what I should do. Lets say I have 1000 players playing and 10,000 ...
6
votes
3answers
6k views

Efficient Tile-based collision detection for a lot of squares?

currently I am working on my own take of a tile-based game (think Terraria, but less fantastical (I think that's a word? Sorry if it isn't)). Anyway, I currently have collision detection working ...
6
votes
4answers
341 views

If I know a given action will result in a collision, should I allow the action to occur anyway?

I've finished programming my game engine, and now that I've been testing it, I've been noticing some graphics problems. The big one is that when a player tries to push against a wall, their character ...
4
votes
2answers
955 views

I need help with 2D collision response (of stacking rotating polygons, with friction and gravity, for a game)

Hi I am looking for suggestions on how to write a collision response for game programming purpose (so not a scientific simulation). I am dealing with 2D polygons that are rotating, and I want them to ...
1
vote
1answer
183 views

Binary operation for fast 3D game engine

I had a thought while ago. I read about bitBoard and I was curious, could be the concept be applied in 3D? What I mean is to use a 3D matrix of boolean value, which correspond to the voxels. So that ...
2
votes
2answers
755 views

Detecting image curve to move a truck on this surface

I have an image background in surface view I want to move something according to black surface.But i can not do this using height of this image as it return same height.and one more thing ...
3
votes
1answer
906 views

How does double dispatch help collision detection?

There are a few specific techniques to test if one object has hit another object in a game. One of them is called "double dispatch." Can someone explain what double dispatch is, and how it can be used ...
3
votes
1answer
871 views

Platformer collision detection problems

I'm having a few problems with collision detection in my game (written in C# with SDL.Net). Detecting the floor and roof is fine, as does detecting sides of tiles when not jumping/falling. My problem ...
4
votes
1answer
2k views

Collision detection in a 3D heightmap-based world

I'm creating a simple engine to increase my knowledge, and have a Minecraft like world, but the height is only one block. How would you suggest I detect for collision? AABB would be good, but I have ...
2
votes
1answer
989 views

How to detect collisions in AS3?

I'm trying to make a simple game, when the ball falls into certain block, you win. Mechanics: The ball falls through several obstacles, in the end there are two blocks, if the ball touches the left ...
0
votes
1answer
387 views

Java Tile Collision Detection not accurate enough

How can I make my isometric tile collision detection more accurate, I'm using the Rectangle class from java to detect collisions but because it's a rectangle it overlaps other rectangles which means ...
4
votes
1answer
941 views

Calculating normal vector on a 2d pixelated map

I want to know an efficient way to get the normal of the surface of a 2d map. suppose an object hit the map, i want the object to bounce accordingly. The problem is, the "bounding box" of said object ...