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

Having issues with pong physics, is my approach wrong?

I've been working on a pong clone, i've made games in the past but they have all been very hacky. This time I was trying to go for a better approach in terms of using OOP or patterns. So far the games ...
1
vote
0answers
52 views

Setting up 3d Collision for Primitive shapes

Im having some trouble understanding how to set up collision detection between my first person camera and my primitive shapes which are made using the vertex buffer. Do i give my camera a boundingBox ...
1
vote
0answers
64 views

java slick2d - gettileproperty returns true when it shouldn't

I'm trying to implement some collision detection to a test game i've been making. I've used TiledMap to create the map and set a property on one of the tiles to blocked=true This tile is then drawn on ...
0
votes
1answer
64 views

JBox2D bodies don't collide?

I have two objects. A dynamic player and a static ground object. It was working for a while until I did some refactoring and suddenly my play falls right through my ground object. Is there anything ...
1
vote
1answer
74 views

Preventing rapid inversions of boolean on Collision detection

I know this is both a strange question and a stupid question. But this is an issue I have dealt with in every single game I've made, and I have yet but to find a solution. I can't be the only one ...
2
votes
1answer
38 views

Saving resource

I'm trying to develope a simple platformer on Java, I was wondering if is it better to handle the collissions in a level (player with floor, player with enemy ecc...) by a level handler class which ...
0
votes
1answer
87 views

How to retrieve a cube collision by faces

I work for a while on a minecraft game (voxel). I am front a problem for a long time about the collision detection. I want recover the cubes collision from my highlighted black's cube like on the ...
1
vote
1answer
98 views

Is this Possible to force gameobjects (coliders etc) to get stretched based on the aspect ratio of the screen?

Well with unity3D, I am in big trouble whenever I use sprites. As for textures I compensate for a evener look by Stretching it (Screen.width & Screen.height- that's fine for low end 2D games). Now ...
-1
votes
1answer
65 views

How to stop characters running in to each other? [duplicate]

I am new to pygame and am creating a small game in which players can push each other to go outside the given arena to score points. I have a problem in detecting when characters run in to each other. ...
0
votes
1answer
87 views

JBullet - Detecting when 2 objects collide?

How can I detect when 2 collision objects collide with JBullet? Currently, all body types are going to be of type RigidBody. I have quite literally been trying to find the answer of this for over 2 ...
3
votes
2answers
516 views

How can I tell what a rectangle intersects with?

I understand XNA's Rectangle class is rather limited, but surely there is a way to tell what a Rectangle is intersecting with? If I had Rectangle boundingBox = new Rectangle(stuff here); how would I ...
0
votes
2answers
239 views

3D collision physics. Response when hitting wall, floor or roof

I am having problem with the most basic physic response when the player collide with static wall, floor or roof. I have a simple 3D maze, true means solid while false means air: bool ...
1
vote
0answers
66 views

Storing rigid body collision shapes in local or world coordinates

I'm writing the beginnings of a lightweight 2d rigid body engine (in javascript, as a hobby project), and i'm debating whether to store collision shapes in local or in (updated as needed) world ...
2
votes
2answers
79 views

Can I make a character solid but not lose non-physics behaviour?

My character can walk around in the world, but walks through other objects, for example a cylinder (stand-in for a cannon). To fix this I added a capsule collider to each of the character and ...
0
votes
1answer
95 views

Java Game Gravity Collision Detection Working Incorrectly

I have searched for this question but was unable to turn up any results - I am making a Java platform game (I have created many top-down games, but nothing with gravity like a platformer) and I have ...
2
votes
1answer
150 views

Detect obstacles in path on a tile-based map

I'm creating a 2d game with a tile-based map, but smooth movement. I currently use A* in combination with some other tricks for pathfinding, and one issue what I've been dealing with is getting the ...
0
votes
1answer
76 views

How can I determine if an object hit the top of a tile rectangle in MonoGame? [duplicate]

I've been implementing an AI system in my 2D game using MonoGame. In some situations when a collision between two objects occurs, I need the NPC to move in different directions depending on the ...
0
votes
1answer
99 views

LibGDX: Miscalculated polygon collision

These 2 polygons are not colliding, though this method returns true: Intersector.overlapConvexPolygons( new float[]{ 100.0f, 750.0f, ...
4
votes
1answer
950 views

How can I run a Phaser engine game without a window?

I'm currently creating a multiplayer game using the HTML5 framework Phaser. It's a game where zombies spawn on the map and players have to shoot them to kill them. The zombies target players that are ...
0
votes
0answers
86 views

Collision Avoidance/Steering around moving obstacles

I've done a decent amount of research and I've read up on pathfinding algorithms and such, but I can't seem to find anything to do with the mentioned behaviors when moving around obstacles that also ...
1
vote
1answer
147 views

2D Collision in JavaFX - Bad accuracy with .intersects()

I have several Shape objects - Circle, Rectangle and Polygon. I use the built-in .intersects(Bounds1, Bounds2) method to detect collision but it's quite inaccurate. Circle c1 = new Circle(20); ...
0
votes
1answer
474 views

How to find objects in front of my player

I am trying to find an object that is in front of my player sprite using the following code RaycastHit2D hit = Physics2D.Raycast(transform.position,Vector2.right,EnemyLayer); //EnemyLayer is the ...
0
votes
0answers
158 views

Moving object next to another object

Is there a common way to get to game objects with colliders to 'touch' each other without trying to reach the same position? I dont want to move object A to the position of object B cause they will ...
0
votes
1answer
368 views

How do I add a Rigid body and a box collider component to a Texture2D?

I am making a snake game. I'm basing it on a basic tutorial game, which does no collision detection, wall checking or different levels. All snake head, piece, food, even the background is made of ...
2
votes
2answers
129 views

SAT - How to find Shortest line between two static convex 2D Polygons

I have a pretty standard SAT algorithm that seems to successfully be detecting collisions.. but now I am looking for some assistance in finding the Shortest line between 2 separated Polygons. I ...
0
votes
1answer
348 views

How do I handle collision response between many different types of game objects?

I am looking for a way to avoid the dreaded switch or if/else scenarios between numerous game object types when a collision takes place in a game. For example: You have a list of game objects which ...
0
votes
2answers
332 views

2D Rectangle Collision

I want to make a small 2D game. In the game you can go in all directions(with the bird's-eye view) and can shoot. (A little bit like BoxHead http://de.y8.com/games/box_head_2play) My problem there is ...
1
vote
1answer
83 views

Calculating the point(s) at which two moving objects are a certain distance from each other

Problem This is similar to a Closest Point of Approach calculation, but instead of the closest point(s), I want the points at which the objects are a given distance away from each other. (Imagine two ...
1
vote
2answers
495 views

Why is mesh baking causing huge performance spikes?

A couple of seconds into the gameplay on my Android device, I see huge performance spikes caused by "Mesh.Bake Scaled Mesh PhysX CollisionData" In my game, a whole level is a parent object containing ...
0
votes
0answers
118 views

How can I align a 2D object properly using tilemap collision

I'm making a mario clone, and I have been working on the collision but I can never seem to get it right. I started out with "true/false" collision, aligning the player at it's last position, and as ...
2
votes
2answers
120 views

Sweep collision between two moving spheres?

Say I have a scenario like this: Here I got two spheres (sphere A and B) that moves from on spot to another during a frame. How can I predict where these two collide if they collide at all? In ...
0
votes
1answer
251 views

How do I implement pixel-exact collision server-side?

Recently I made a 2D offline game with HTML5 Canvas and JavaScript. I'm detecting collisions by first checking whether image bounding boxes overlap. If they do, I check against the bounding boxes, ...
1
vote
2answers
152 views

Collision detection circle-segment-segment

I've already implemented collision detection in my game loosely following this tutorial, which works great, but I realized there's one major flaw. The player and the enemies are circles, while the ...
3
votes
3answers
197 views

Using uniform grids for collision detection - Efficient way to keep track of what a cell contains

I was looking for an efficient way to implement collision detection in a 2D game. A way that won't result in an O(n^2) level of complexity. A lot of people recommend to use Uniform Grids for this ...
0
votes
1answer
107 views

How do physics engines like Box2D detect and respond to collisions between arbitrary polygons?

I've always wondered how collision detection like this was achieved, and I've always wondered what the response would be. Do they perform line-line intersection tests for each line making up the two ...
0
votes
0answers
74 views

How to implement Uniform Grid for collision detection

I want to implement a unifrom grid to use for collision detection in my 2D Java game. This way instead of checking for each game object if it collides with any other object on the screen, I only check ...
3
votes
1answer
143 views

Calculate point of circle–circle collision between frames

I need to find the exact XY coordinate where a circle collides with another circle calculated between frames. This means that I take the coordinate of the moving circle on the previous frame and take ...
0
votes
1answer
75 views

How do I keep enemies from clumping up into one area? [duplicate]

I am making a zombie game and as I was making it I noticed the zombie AI starts to clump up into one mega zombie in one area. I was wondering how I could keep the zombies from doing that and instead ...
2
votes
1answer
139 views

How to impale and stack targets correctly according to the collider and its coordinate?

I'm making another simple game, a catch game, where a spawning target game object must be captured using a skewer to impale it. Here how: At the start, the falling object (in red) will fall in a ...
0
votes
1answer
243 views

Top-down player collision with walls

I am having trouble trying to think of how I am going to approach collisions in my game. My idea which sucked in the beginning because it would reduce performance dramatically has failed which was ...
1
vote
1answer
150 views

Pixel Perfect collision detection on rotated bitmaps [duplicate]

I have two bitmaps which are being drawn onto a canvas using a matrix canvas.drawBitmap(bitmap, matrix, paint); first to work out if I need to check for a collision i am using eucilidean vectors ...
0
votes
0answers
83 views

Precalculating timespan of bullet collision on cubic bezier curve circles?

I'm fairly new to game logics, C#/XNA (The language/library of choice) and bezier curves in general, and is stuck in my current project. I'm going to try to explain as thoroughly as I can what the ...
3
votes
1answer
114 views

How do you prevent AABBs from passing through each other?

I know what an AABB is, but I don't know how you would check for collision with an object that is going really fast. If an object goes fast enough, it can skip over other bounding boxes without it ...
0
votes
0answers
60 views

Overlap detection, nearest neighbors

I'm trying to get something similar to the Nearest Neightbor Problem, except I only want neighbors with radius overlapping a radius, and all of them. I'll explain my problem before explaining what I ...
0
votes
3answers
161 views

Collision Detection in a big map?

So I've been wondering lately... on games like pokemon (on ds and gba), How did they handle the collision of all those tiles in the map? Should all those collision checks running in the background ...
1
vote
0answers
97 views

Speeding up point-in-polygon for Python

In researching collision detection methods for non-Rect-like objects I came across point-in-polygon -- specifically, the even-odd rule. The one presently on Wikipedia claims it is written in Python, ...
0
votes
1answer
342 views

How does Raycasting work in XNA Farseer and player collision?

Wanting to know how to figure out if player's bottom is colliding with object so that I could allow the player to jump. I was trying to use OnCollision but was referred to ray-casting, I looked ...
2
votes
3answers
1k views

libgdx - collision detection with tiled map java

currently, I am working on a 2d rpg game which is similar to final fantasy 1-4. I can load up a tiled map and the sprite can walk freely on the map. However, I will like to create a wall for it to ...
1
vote
1answer
136 views

Calculating How To Intercept a Moving Object [duplicate]

So I have two objects, Target and Interceptor. Target's position, direction of movement and movement speed are known, and Interceptor's position and movement speed are also known. Both movement speeds ...
3
votes
1answer
134 views

Calculating impulse with multiple collision points

In my amateur 2D rigid body physics engine for a game I react on collisions between two bodies with an impulse j (formula 11) as explained here. To calculate this impulse I need one contact point P ...