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
3k views

Detecting collision between ball (circle) and brick(rectangle)?

Ok so this is for a small uni project. My lecturer provided me with a framework for a simple brickbreaker game. I am currently trying to overcome to problem of detecting a collision between the two ...
2
votes
2answers
228 views

Collision detection against large arbitrarily shaped textures

What is the most effecient way to do collision detection on strangely shaped textures in XNA? Here is an example texture: As you can see, it is far from a perfect square. I want the player to ...
-1
votes
1answer
103 views

GameTimer too fast, Objects staying intersected and rand not returning value inbetweem min and max [closed]

So I'm developing a game called PongBreakout in c++ using a game engine i got from uni (when i was there..) I've got a few problems with my game that i'm struggling to fix and need some help to figure ...
0
votes
1answer
141 views

Gravity/collision problems: models jumping

I'm pretty new to Unity3D game engine and game development, so don't judge me strictly. I import a model of the rail track, add rigid body component (with mass 1 and use gravity flag) and box collider ...
0
votes
2answers
256 views

XNA 4.0 Plane size

Possibly a dumb question, but do planes stretch on to infinity? I can't define a spanning area for it, and would have to do some sort of check for collisions like if(x intersects BoundingBox and ...
0
votes
1answer
517 views

Collision detection optimization for a top down shooter

I'm relatively new to game development and have been trying to learn how collision detection is coded. I mostly work with Actionscript 3, but I'm learning C++ on the side. I've been wondering how ...
0
votes
0answers
972 views

How to do collision detection in 3D using bounding boxes?

I am using c++ in visual studio 2010 with opengl. I am trying to make a programme that has 2 boxes that are able to be stacked on top of each other but I am having some trouble with the collision ...
0
votes
1answer
4k views

Unity: OnCollisionEnter not called

I created a sphere object, added a rigidbody component (no kinematics) and attached a script to it like this: function Update () { } function OnCollisionEnter(collision : Collision) { ...
-1
votes
2answers
226 views

Tile Based Collision Checking In Java?

I have my map stored in 2 arrays: Tiles : Tile names TileTypes : SOLID or BASIC I want to be able to walk through BASIC Tiles (Like ground tiles). But not the SOLID Tiles (Like wall tiles). I ...
10
votes
3answers
500 views

How to implement collision detection of portals?

For example, take this scenario (excuse my horrible drawing skills): This is based on "Portal", where the stickman is going through the blue portal (which is linked to the red portal), but there is ...
1
vote
1answer
395 views

I'm having trouble with collision detection in XNA [closed]

I've written a tile editor and game in XNA, with velocities and gravity, and am having trouble with some of my collision detection things. It works okay, but seems to glitch between just inside and ...
4
votes
1answer
118 views

Collision Response: game character vs. density function

Introduction I am working on my own "novelty" game-engine project, where the world is represented by a continuous density function. It has only one interface, a function that returns the density at a ...
0
votes
1answer
77 views

Controls become inverted after a collision

I'm just prototyping a simple project. I'm moving a sprite on screen using the Xbox gamepad: public override void Update(GameTime gameTime) { gamePad = GamePad.GetState(PlayerIndex.One); ...
2
votes
1answer
228 views

Collision Resolution: How to avoid Interpenetration/Tunneling Caused by Prior Collision Handling? [duplicate]

My game processes world collisions followed by entity collisions. The problem here is that entities can break through walls the next frame when world checks are run again as a result of the prior ...
1
vote
1answer
166 views

Application design for specific points on image

Hi guys I am starting a simple hobby app in Unity, its a 2D app, which have some alphabets like A,B,C..Z (images) . There ll be specific paths where user touch one by one to complete drawing the ...
1
vote
2answers
702 views

AABB-AABB sliding collision response

I have many objects with AABBs and a player surrounded in an AABB. If I represent my player with a point everything works smooth with detection and wall sliding as a response (for example what wall ...
-2
votes
1answer
99 views

Help me debug my 3-d collision code [closed]

I have been havaing a problem doing 3-d collision in a game i have been trying to make for several weeks now. What i am trying to do is prevent a PlayerModel object from colliding with Obstacle(cube) ...
1
vote
0answers
179 views

Sketchy results from ray-plane intersection code

I've set up a demo with simple first-person controls using C++ and OpenGL, and it seems to work reasonably well. My goal is this: when the player looks at a plane and clicks the left mouse button, ...
8
votes
1answer
274 views

In Box2D, how can I get the compression force on a specific body?

I'm using Box2D. As you can see, there are three dynamic bodies connected to each other (think of it as a table from front view). LEG1 and LEG2 are connected to the static body (it's the ground ...
1
vote
1answer
636 views

How to detect screen boundary using AndEngine GLES1?

I am using the AnalogOnScreenControl to move my sprite around the screen. I would like to restrict the sprite so it can not move outside the screen boundaries. I have tried putting a line at the ...
2
votes
0answers
480 views

Collision with RigidBody

I am currently working in a project with UDK and I have a problem with collision. I have a Crate who is a kActor in RigidBody physic and my player who is a Pawn. When my player move and go in ...
1
vote
1answer
623 views

2D tile-based collisions: using different methods by tile?

I'm trying to write a collision handling method that handles each of the 9 potentially colliding tiles (the player's and the 8 around him) differently according to a "CollisionType" value attached to ...
1
vote
2answers
3k views

Collision detection - Smooth wall sliding, no bounce effect

I'm working on a basic collision detection system that provides point - OBB collision detection. I have around 200 cubes in my environment and I check (for now) each of them in turn and see if it ...
4
votes
2answers
503 views

Collision detection in pong style multiplayer network game

I've recently implemented an authoritative server (node.js with socket.io) for a multiplayer pong game. I've looked at client side prediction and fixing timesteps and starting to grasp the notion of ...
1
vote
1answer
123 views

Apparent tunneling with issue bounding box collision detection

I'm working on a Break Out game remake and I'm getting a weird bounding box collision detection behavior. It seems like the ball is going under the paddle even if the hit is on top. Weird enough the ...
0
votes
1answer
589 views

Creating A Bounding Box around each item in a list XNA 4.0

I have asked a similar question before except i am more experienced and have more understanding of XNA. I have bullets that shoot whenever you press RightTrigger. I am having trouble though creating ...
1
vote
0answers
286 views

iOS cocos2d - sprite gets stuck in collision detection

I'm developing a top down game in cocos2d and I have collision code that checks collisions between enemies and the player so that they don't go through each other. The code seems to work but the ...
5
votes
2answers
275 views

How can I normalize a vector if I am handling movment of each axis seperatley?

I am writing a 2D tile based game engine in XNA, and I've recently fine-tuned my collision detection using the answers provided here and more specifically here. The tile based collision detection now ...
-3
votes
1answer
2k views

Java2D Collision Detection

I've been wrapping my head around Java2D collision detection. I am working with Slick library and trying to figure a simple clean code to check if a collision has occurred. The idea is fairly simple, ...
1
vote
0answers
992 views

Why do restitution values less than one still cause infinite bouncing in Box2D?

I'm currently trying to implement basketball bouncing into my game using Box2d (jBox2d technically), but I'm a bit confused about restitution. While trying to create the ball in the testbed first, ...
1
vote
1answer
109 views

Checking collisions on isometric grids with offsets

I have a isometric grid with sprites that are placed in this sort of manner: x: 5 y: 7 OffsetX: 5px OffsetY: 10px This is - what i want to do is when placing a new sprite, check to see if they ...
-1
votes
2answers
87 views

When I create more than one boundary, every one but the most recent breaks [closed]

So basically what I have is a function called createBoxBoundary, which, when the player position is within certain limits, sets boundary variables to true. Pretty straightforward. However, when I call ...
0
votes
1answer
219 views

Collision with Two Angled Platforms

I've encountered a problem in my attempt to implement Collision Handling for a game I'm creating, involving a collision with two angled platforms. I'm using GJK-EPA for detecting/handling collisions ...
2
votes
2answers
459 views

3D Collision Detection with XNA

So I'm trying to implement some collision detection in XNA. I'm aware of the Bounding Spheres, but I worry with the accuracy, most items in my game are cubic in nature, so it seems very square-peg in ...
0
votes
2answers
84 views

Checking bounds of a quad

I want to know how would I tell if a quad touches another quad in my game built in Slick2D. I have a class that I named "Bounds" which has 4 "Point" objects which just store an X and a Y value and a ...
4
votes
1answer
259 views

Networked Physics - Interpolation Causes Physics Engine to Explode

A major issue I am encountering right now is that my physics engine (BEPU) and my network interpolation are conflicting with each other. The player is a physics object, and so the physics engine ...
1
vote
1answer
203 views

Complex Models using bounding boxes in xna 4

I'm new to XNA, and have just started looking into collision detection. I've managed to get a bounding sphere around my first person camera object and i want to check the collision between that and ...
4
votes
1answer
533 views

Collision Filtering in Box2D

I have four bodies in my Box2D World. Each are polygon shape, with some physics parameters. Now when the game start, I need one of the bodies from the World (BodyA) to not be allowed to collide with ...
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 ...
0
votes
1answer
264 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 ...
2
votes
3answers
797 views

Oriented Bounding Box - How to?

I've been trying to write my own collision code, less because I want to, more because I want to understand its working. To do this, i've been working off of the popular collision book i'm sure you've ...
5
votes
2answers
581 views

Whats the physics behind the doodle jump game?

I'd like to know how we can achieve the doodle jump type physics using andengine. I mean the character is not colliding with the ground blocks when he moves upwards but will collide when he came ...
0
votes
2answers
659 views

Online MMO collision detection for players & walls

Let's assume the following: I have a server which stores the player's position (float x, float y, float z) Client sends the server it's updated position ever 250ms or so. Server has bounding boxes ...
0
votes
1answer
331 views

How do I detect the intersection of a curve with itself?

I'm developing a game in which the player can draw a line. I want to detect if that line intersects with itself. How would I do this?
0
votes
1answer
305 views

Collisions and camera tilt in XNA C# 3D Game [closed]

I am working on a game programming class project and need some help. I cannot find a good tutorial on how to get these 3 frictionless spheres to collide with each-other, the surface and the walls of ...
0
votes
2answers
215 views

3d to 2d Collision

I have a 3d model which rotates around my screen, it's always on the Z axis = 0 where everything of my 2d images are. My 2d images fly out of the center and get bigger to give the view as getting ...
0
votes
0answers
221 views

(XNA - Farseer) Not always colliding and moves seemingly randomly then objects freeze if they do collide

So I'm mixing XNA and Farseer, the first for graphics and the latter for collision and physics. If this is a horrible choice to start out with, tell me that as well. In any case, I have set up a ...
0
votes
1answer
235 views

AS3 Rect-Rect Collision

Basically, my game has the player's attack hitbox change based on the attack being performed. I tried to make a simple collision test that takes an enemy's coordinates and have it check to see if it's ...
12
votes
3answers
2k views

Resolving a collision with forces

In my 2D physics engine, I can detect AABB vs AABB collisions, and resolve them by finding the shortest penetration vector and adding it to the AABB's position. Doing this "pushes" the first AABB ...
-1
votes
1answer
210 views

Collision detection tutorials [closed]

I'm supposed to develop a Java game using AWT and Applet libraries. I'm stuck with the concept of "collision detection". If you can help me with any tutorials that explain the concept (how it works) ...