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
85 views

How to loop through objects in class (XNA)? [closed]

In my game I have an Enemy class, and in that I have a constructor which I use to make Enemy objects. How do I add all Enemy objects to a list or loop through all of them using a foreach loop? I ...
2
votes
1answer
98 views

Collision detection in libgdx

I am currently writing a little zelda like game and have a little bit of a problem with collision detection. It works but the the character stands to far away from the object. Here is my player ...
1
vote
2answers
113 views

Detecting collision of two sprites that can rotate [duplicate]

I have a problem with collision detection in a 2D Java game. Normally, what I would do is create a getBounds() method for an object that can collide with other objects. This method would return a new ...
0
votes
2answers
135 views

How to get surrounding tiles in a tile array

I've created a tiled map that holds two layers, one for the tile type, and the other for whether it is solid or not. I plan on creating very big maps, and checking every tile seems like it would slow ...
0
votes
1answer
145 views

2D Tiled Map - Small tiles or big tiles with pixel-precise movement

I am using Java - LWJGL - Slick2D . I have tried to do a proper collision detection with 32 x 32 tile size but failed three times. I just cant get it to work! I found a youtube video that was using ...
0
votes
1answer
144 views

XNA 3D Unable to Position Bounding Sphere

I have a collision method which seems like it would work, and it does, but the bounding sphere is always at 0, 0, 0. How do I fix this? Any more code and or details are avaliable upon request. Any ...
3
votes
1answer
218 views

Collision detection for sloping tiles

I've been looking into adding 'sloping' tiles into my platform game and my first attempt at collision detection with these tiles has produced some promising results (considering it's a first attempt), ...
1
vote
1answer
188 views

JavaScript - 2D Top-down Collision Detection issue

I'm developing a 2D Top-down Game using HTML5 Canvas and a custom Game Engine. I'm implementing the Quad-intersection detection (Function below, if it helps) on different areas of the Sprites (As ...
0
votes
1answer
355 views

Top-Down Tilemap Rendering and Collisions in Libgdx

I'm sorry if this question has been previously answered, but I was unable to find an answer here or through google. I'm trying to make a simple roguelike-like that would feature a top-down tile map, a ...
2
votes
3answers
157 views

Strategy for detecting hits from a “cylinder ray”?

I was planning on using ray casting for collision detection in my game. However, when I use an attack similar to this: (which would project something like a cylinder), how would I go about ...
2
votes
1answer
107 views

Using latest TiledMap, how do you get a specific tile from x and y index?

Seems basic enough, but I can't seem to find the answer: I am trying to implement collission detecton and for that I need the properties of the tile the player is currently entering. I am using ...
1
vote
1answer
156 views

AABB vs Rectangle

I'm trying to wrap my head around 2D physics and stumbled upon Axis Aligned Bounding Boxes, and I have a couple of questions regarding them. In all AABB structs I could find out there, people prefer ...
1
vote
1answer
66 views

Shape collision checking

I want to check in an shape, wether an point is in it or not. The shape is descriped with one Array of float vectors. The vectors are added in clock direction. The first I can check very easy, the ...
1
vote
2answers
133 views

Collision Scenario, Detection and Response

I have AABB, BSphere, a Polygon Soup, a Triangle, a Plane, a Point and a Ray objects with a collision test that returns 'bool' if two objects collide or not. How can I use the above objects to ...
0
votes
2answers
69 views

When and how should I update my collision grid?

When and how should I update my collision grid? Current implementation: buildGrid(): add all entities with collision to the grid handleCollision(timePerFrame, entities): handle all collisions ...
2
votes
1answer
168 views

Collision Shapes Abstraction Design

Straight to the facts. I have a base CEntity class for different entities in my game: Static entities ( those do not move, simply props and items ) Dynamic entities ( these move, jump ) Each of ...
1
vote
1answer
141 views

Detecting walls or floors in pygame

I am trying to make bullets bounce of walls, but I can't figure out how to correctly do the collision detection. What I am currently doing is iterating through all the solid blocks and if the bullet ...
0
votes
1answer
81 views

AABB SAT code detects collision wrongly [closed]

I've been having trouble getting my SAT code working using AABBs, and I've been trying to find a solution but, I'm scratching my head. For some reason, it detects collisions very wrongly, as shown by ...
0
votes
1answer
93 views

Passing through edges of AABB collision

When I move, I grab the tile in front of the player, but when the player is colliding between two tiles, I grab the wrong tile due to rounding error. I made a video explaining what I mean. As you can ...
0
votes
1answer
189 views

AABB collision detection not detecting in some cases

I'm using simple AABBs in a tile based world, and for some reason the algorithm does not detect collisions when moving towards the left and then down. I actually upload a video to YouTube to ...
1
vote
2answers
120 views

Point vs Convex Hull

I'm trying to implement a simple collision response to a point intersecting a convex hull. So far I can detect if the point is inside the hull. But now I want a collision response that translates ...
0
votes
1answer
94 views

Map color collision problem

Hello i'm doing a game in WPF, 2D version (top view) I have the map and i'm trying to check for color collision in pixel each time the timer is activated Well...with 1 object it works fine but with ...
0
votes
2answers
121 views

Creating a collision shape for a complex model

I'm currently creating the collision system for my 3D XNA game. To check collisions with models (especially complex ones) like trees or other plants, I thought about rendering a low poly version of ...
0
votes
1answer
131 views

Predicting trajectory collisions for multiple moving objects [duplicate]

For the most simple of 2D games, I have implemented a posteriori collision detection (overlapping rectangles) on the xy Cartesian plane, but am now interested in understanding the basics of a priori ...
6
votes
1answer
184 views

Finding roots/zeros for collision detection?

For the most simple of 2D games, I have implemented a posteriori collision detection (overlapping rectangles) on the x/y Cartesian plane, but am now interested in understanding the basics of a priori ...
0
votes
1answer
287 views

implementing collision detection and handling for tiled 2D world with smooth wall sliding

Im using SFML 2.1 for graphics and my game structure follows SFML book quite closely (SceneGraph implementation etc) My world consists mostly of characters (around 1-400, moving around) and tiles ...
0
votes
2answers
230 views

How to properly handle attacks in an 2D Platformer?

I am building an 2D Engine in JavaScript and if my actor attacks an enemy, a hitbox appears for a certain amount of time and then disappears. If the target keeps standing inside of the hitbox he gets ...
0
votes
1answer
217 views

LWJGL Collision Detection

I cannot find LWJGL collision detection with a camera and walls. Like making it to where you can not walk through walls and other different shaped rectangular prisms and cubes. How do I set up LWJGL ...
2
votes
2answers
163 views

What are “distance fields” and how are they applicable to collision detection?

I was looking at some efficient methods for collision detection in a scene with both static and dynamic objects when I came across "distance fields." I tried to search and understand this concept, ...
1
vote
3answers
187 views

Lag created when detecting collision

I'm fairly new to gamedev and have encountered a problem with the collision detection system. The collision is essentially worked out like this: for (int x = 0; x < playerprojectiles.Count; x++) ...
0
votes
1answer
154 views

Circle-Rectangle collision velocity adjustment

I created my circle vs. rectangle method based on this algorithm: http://stackoverflow.com/questions/401847/circle-rectangle-collision-detection-intersection Currently, I have a dynamic ball with ...
0
votes
1answer
230 views

Circle vs. Rect Collision accuracy problem

The blue ball is dynamic and is supposed to bounce off the walls, as well as the rectangle. Currently, the green rectangle is adding an invisible line to the scene, which doesn't let my ball go where ...
0
votes
2answers
191 views

Best collision shape for rooms

I'm wondering what is the most efficient collision shape to use with APIs like Bullet or Havok for rooms/interiors. Rooms tend to be boxes but are concave since the normals point inward which means no ...
0
votes
1answer
113 views

Collision method for multiple circles

This is a bouncing ball program. There is 1 dynamic circle and 3 static ones. The static ones are obstacles for the dynamic circle, and the dynamic circle is supposed to bounce off of the static ...
0
votes
2answers
191 views

How to detect collision between a camera and a mesh?

I am wondering how you would be able to extract mesh properties (i.e. faces, vertices, and vertex normals) and use them to create a collidable object, one that a camera can't go through ? I am using ...
2
votes
1answer
203 views

Circle to Circle collision - bad accuracy

Circle1 (blue) is moving and its X and Y bounds are the screen (meaning it bounces off the walls). Circle2 (black) is stationary. Circle1(blue) is supposed to bounce off of Circle2 without ...
0
votes
0answers
33 views

2D collision beetween a sprite and an array of sprites [duplicate]

I am creating a simple Android jumper (think Doodle Jump or Abduction) using libGDX so I can get started in game programming. My problem is that I need to figure out a way to check for collision ...
0
votes
1answer
228 views

Bounce off of objects

How do I make my ball bounce off objects on the screen? I'm having trouble detecting the collision, as well as calculating the response. The picture below is a good example of how the program should ...
2
votes
0answers
116 views

What would be a good way to implement Zelda like attack? [closed]

I'm looking for ways to implement "attack" like Gameboy Zelda used. A method I came up with is: Create a rectangle near a player based on the direction the player is facing when every time attack ...
0
votes
1answer
112 views

Problems about oriented bounding boxes collision detection

I get a question for the following code which detects if two OOBs collide by SAT. The OBBs struct is also listed below. struct OBB { Point c; // OBB center point Vector u[3]; // Local x-, y-, and ...
1
vote
1answer
437 views

2D Rectangle/Circle Continuous Collision Detection

I'm looking for a fast 2D continuous collision detection algorithm for circles and rotated rects. It needs to determine the time of collision. Both shapes may be moving at high speed, so the ...
1
vote
1answer
151 views

How to resolve collisions smoothly?

Currently my collision method is glitchy, because it gets the last "good" position it was when it wasn't colliding and teleports it to that location when it collides with something. This method works, ...
2
votes
1answer
337 views

Finding Z given X & Y coordinates on terrain?

I need to know the most efficient way of finding Z given X & Y coordinates on terrain. My terrain is set up as a grid, each grid block consisting of two triangles which may be flipped in any ...
2
votes
1answer
209 views

Project collision shapes to plane for 2.5D collision detection

I am working on a top down 2.5D game. In the game anything that overlaps on the screen should be 'colliding' with each other regardless of whether they are on the same plane in the 3D world. This is ...
2
votes
1answer
204 views

Tiled Editor: How is this Map Handling Collision?

BrowserQuest map in question. From what I understand, with tiled, there are two main ways to specify collision: Create an object layer, and interpret the shapes in the engine as collision objects. ...
3
votes
1answer
227 views

How do I detect collision with isometric walls?

I will use game called "Project Zomboid" as an example. Here is a pic how does it look > How should I handle player's collision with walls constructed like that? It's easy to handle walkable and ...
0
votes
1answer
145 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 ...
1
vote
1answer
204 views

2D fighting bounding boxes

I'm prototyping a 2D platformer/brawler game for uni and I'm having some trouble with creating collision/bounding boxes. This is most likely going to end up on a Vita so I do have some library ...
0
votes
0answers
51 views

3D Box Collision Data Import

I'm trying to implement a collision system using oriented bounding boxes, using a center for the box, it's extents as a 3D Vector and a rotation matrix, which is all stuff I picked up online and seem ...
2
votes
0answers
105 views

JBox2D Polygon Collisions Acting Strange

I have been playing around with JBox2D and Slick2D and made a little demo with a ground object, a box object, and two different polygons. The problem I am facing is that the collision-detection for ...