# Tagged Questions

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

133 views

### How do I check for non tilted 2D rectangle collision?

I'm trying to find out how to check collision with different rectangles. Now the cubes I have have a x, y, height, and width to them. So it might look like this on the screen: And not like this: ...
544 views

### Collision Detection - Slide Around Sprite

I'm creating an RPG using XNA/C# and am trying to add some complicated collision detection code. I have the playable character 'Wizard' and when it collides with something, a method gets called in his ...
2k views

### How should I calculate the new angle/direction of my ball hitting a wall? [duplicate]

I'm building a Pong game and I am stuck at how the ball should bounce when hitting a horizontal wall. I tried a few methods but none seems to work. So far I have an update method, which is called ...
331 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 ...
6k views

### Collisions reflecting ball velocities incorrectly

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 ...
308 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 ...
119 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 ...
254 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 ...
370 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 Plane?...
1k 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 "...
11k 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) { Debug....
495 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 ...
830 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 ...
651 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 ...
142 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 ...
83 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); ...
429 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 ...
172 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 ...
2k 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 ...
104 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) ...
373 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, ...
336 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 body). ...
990 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 ...
610 views

### Why does my RigidBody collision fail depending on which entity is moving?

I am working on a UDK project and have a collision problem. I have a Crate which is a kActor with RigidBody physics and my player who is a Pawn. When my player moves and collides with the crate, the ...
763 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 ...
6k 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 ...
942 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 ...
173 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 ...
959 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 ...
380 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 ...
898 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 ...
4k 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, ...
1k 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, I'...
129 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 ...
92 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 ...
266 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 ...
684 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 ...
99 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 "...
345 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 ...
257 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 ...
1k 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 ...
303 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 ...
435 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 ...
3k 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 ...
827 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 ...
1k 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 ...
729 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?
420 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 ...