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

Collision causing FPC to go haywire

I have created a first person controller as an enemy in my game (Zombie), my character is an Archer using Arrows as projectiles fired using: if(Input.GetButton("Fire1")) { shotForce += ...
1
vote
0answers
38 views

Swept AABB vs AABB Calculation Error

I'm having issues running simple AABB vs AABB collision detection. I'm able to successfully detect collisions without checking with velocity. But for some reason my code keeps prematurely firing ...
0
votes
1answer
35 views

In 2d, how do I discern when a character is on top of an object, from when it is on the side?

I am building an auto-run platforming game. I have code so that if the character collides with a wall, they are pushed back until they are able to get past the wall. Unfortunately, this means that ...
0
votes
1answer
96 views

Bullet: No Bouncing off the walls

I'm using Bullet Physics for Collision Detection in a first person game. The collision basically work fine, I cannot walk through objects. But if I walk against the wall and release the key I get ...
0
votes
1answer
31 views

Bullet: Apply any Transformation to RigidBody?

I'm using Bullet for CollisionDetection. I load a scene from a Collada-File using Assimp. Let's say I want to give every object in the scene a RigidBody with a box as CollisionShape. Right now I first ...
0
votes
0answers
61 views

Weird Collisions in ODE

I'm trying to get a basic OBB/OBB Collision System working. For this I use ODE. My problem is: Whenever I use the dSpaceCollide and pass in my Space and my Callback, my Callback shows me, that a ...
1
vote
1answer
26 views

Convert Triangle/OBB Test to OBB/OBB Test

I'm using the collision library OZCollide (http://www.tsarevitch.org/ozcollide/) and I want to do OBB vs. OBB collision tests. The problem is, that this function doesn't seem to exist (see my other ...
1
vote
1answer
123 views

Frustum culling takes ages c++

I have two ways of doing frustum culling taken from different web sources. First one takes 200ms to check 10k AABBs, second around 50ms for the same box count. I read some forum answers, people say 0....
0
votes
1answer
62 views

Player collision with object

so I have an fps controller, and I want to change camera when it collides with a box collider. I think I did it properly but it didn't work. Here's my code. using UnityEngine; using System....
0
votes
0answers
60 views

Side-Collision for Breakout game where ball moves fast

So I've been trying to make a breakout clone, which is my first attempt at a graphical game, I ran into some problems, and was hoping that this community could help me. I've got most of the mechanics ...
0
votes
1answer
97 views

How to handle collision detection

So the way that I am doing the movement for my game is that you can left click a unit (which is just a rectangle object), and then it is selected. While it is selected, you can right click and that ...
4
votes
1answer
84 views

How do I create a custom collision map for clickable areas on a map?

Say I had a map like the one displayed above. What would be the best method of creating a collision map for each individual state where I can click individually?
0
votes
0answers
27 views

OBB Collision Intersection Problem

I'm trying to create OBB's around objects and then collide them using DirectX 11 and C++. It all works fine until I rotate one (or more) of the boxes and then the collision detection returns true too ...
1
vote
1answer
43 views

Collision Detection Unresponsiveness

I'm creating a simple jumper game in Libgdx that makes the player jump over obstacles in order to stay alive. The only problem is that the collision detection for when the player just touches the ...
0
votes
1answer
26 views

Canvas/Paint Mechanic

I am currently working on an idea for a unity game app with a canvas mechanic. I understand I may have to use particles for the brush/paint f/x however I can not think of a way to add collision ...
-1
votes
2answers
57 views

How to pass the snake to pass through one side of the screen and come out the opposite side in c# game?? Help me :(

How do I code the left and right collision, and also tell me how I can set the collision of snake according to the form size. If i want to change or maximize the form, snake should collide with the ...
0
votes
0answers
41 views

OBB/OBB Test in OZCollide

I want to know if anybody, who tried OZCollide (http://www.tsarevitch.org/ozcollide/), knows whether OBB vs. OBB Tests are possible or not. I know there is a AABB vs. OBB function but I can't find one ...
0
votes
0answers
25 views

libgdx - Math reflection to the correct direction

I'm using a simple reflection system, but the game doesn't work how I want. How should this game work? The game has two boxes. A red side and a black side. The player should only sort the bombs to ...
0
votes
0answers
145 views

Collision detection with Physics P2 in Phaser.io

had written this thread that relates to a project I'm developing while trying to learn phaser. I could really use some advise/ feedback on making the user experience a bit more easier as I seem to be ...
0
votes
0answers
10 views

Clicking an entity with transformation

I am trying to understand how best to implement a click detection function in a 2d JavaScript game. I can demonstrate using a simple example of two square 'entities' which can be selected when ...
0
votes
0answers
36 views

Make Kinematic P2 Body collide with world bounds

I have a P2 object( A) with a custom bound that detects collision with another P2 object(B ). However, object A is set to be kinematic rather than dynamic as I do not want object A to react to ...
1
vote
3answers
111 views

C++ Platformer Collision

This is very simple, but I have spent nearly 6 months messing with this and it is always messed up. This is a tile platformer, everything is "normal", x and y correspond to tile. Tiles are 32 x 32 ...
1
vote
0answers
56 views

Phaser - Add collision to a specific tilemap layer?

In Tiled I made two layers, "Background" and "Walls" and I have positioned them accordingly, both as a background and walls, or if you prefer "Not being able to collide" and "Being able to collide". ...
0
votes
1answer
189 views

libgdx - Math for wall collision when adding velocity

I've created a game which spawns a random colored ball in the top or bottom of the screen and moves to random direction with this method. private Vector2 position; private Vector2 velocity; private ...
0
votes
0answers
131 views

c# adding object collision to multiple objects

I'm trying to make a mario, platformer type game, and from following a tutorial, they've done the collision like this, but im wondering if there is a simpler way to it since I want to have collision ...
1
vote
2answers
44 views

Tiled height level collision

I have created the below tilemap in tiled and I am wondering about a good approach to "separate" these two different heights in the map. I would like to keep it tile based, so adding a object layer ...
0
votes
0answers
23 views

Box2d capsule stumbles on ground

I am working on a game with box2d and sdl. I Created a character and some boxes as ground, but faced the problem where the character would run a few meters, and stumble on one of the boxes' edge. I ...
1
vote
1answer
124 views

Collision isn't working in pong

I've posted about another pong problem a while ago, but now I'm having another problem with the ball collision with the paddle , when the ball collides, it doesn't bounce back, why is that? Here is a ...
0
votes
1answer
61 views

Collision Between SKSpriteNode and SKShapeNode

Im trying to create a collision between to objects. one is a SKSpriteNode and the other is a SKShapenode. the Code I have so far for Contact is : func didBeginContact( contact: SKPhysicsContact) { ...
0
votes
2answers
52 views

need to make a ball travel in the angle it was hit from

self.hitBall = function (ball, x, y){ var angle = Math.atan2((x - ball.centerX), (y - ball.centerY)); ball.velocityY = (Math.sin(angle) * 10); ball.velocityX = (Math.cos(angle)...
0
votes
1answer
74 views

Bounce with multiple collisions

Here's the problem: I'm writing arkanoid-like game in Unity 5.3. I'm using 3d physics and simply ignoring z-axis in computations. No gravity, 0 drag and velocity reset every bounce by script. My ball ...
0
votes
1answer
114 views

Unity mesh collider detecting collision on object empty inside

I'm trying to get my first 3D game done with Unity. In this game the character will be flying through some rings. I made the ring asset with MagicaVoxel, exported it in .obj and reimported in Unity ...
13
votes
2answers
2k views

Storing coordinates of every object in server side in MMOs

In an MMORPG: Is it typical or feasible to store the coordinates of every tree, bush rock.. etc in the server side for collision detection? If so, what would be a feasible way to store such a huge ...
1
vote
0answers
29 views

Exact collision detection for high-detail deformable triangular meshes

What robust methods or approaches exist for exact collision detection involving high-detail, deformable geometry? The kind of mesh I am describing is a surface that is specified as a triangulated ...
0
votes
0answers
33 views

Detecting collision between 2 convex meshes in 3D

For the past couple of weeks I've been trying to implement physics in my engine, and I am currently stuck on the collision detection phase. In short, I can perform a triangle-triangle intersection ...
3
votes
2answers
152 views

Need help with a field of view-like collision detector!

I ran into a trouble while making a field of view for my character. I figured how to make it work with a Linecast, but what I really need is a cone-shaped field, so that the character can detect ...
3
votes
1answer
131 views

How to determine contact bodies when multiple bodies overlap and a third makes contact with both at the same time

I understand how the below DidBeginConact function works, but how do you detect which categories make contact when you have multiple colored bars (in the example code) or a friend category and enemy ...
-1
votes
1answer
116 views

How do I make my enemies to follow a path and allow them to collide with the player in Game Maker?

I am making a game in which enemies follow a path. These enemies should be colliding with the player, but it's not working. The enemy is walking the path. And, I want to make it so if the player ...
1
vote
1answer
112 views

Collisions being detected before objects are intersecting

I'm making space invaders (in OpenGL/SDL) and I'm currently having issues with getting the collisions (box collisions) between the bullets and the enemies to be properly detected. In my update() ...
2
votes
2answers
63 views

Java: problem with 2D corner collision

:) It took me many days to create a working collision detection for a 2D java platformer... I am finally calculating the corners of my player but the system is still buggy and I hope that we can ...
0
votes
0answers
30 views

Collision logic with Animations Java

Im trying to code a tile based platformer game with slick2d. While handling the collisions, Im facing with this problem. I could fix it for only that situation but I guess there must be a better way. ...
-1
votes
2answers
127 views

Inconsistent AABB collision detection

I'm making an endless jumper as my first game and I'm running into some problems with the one-way collision detection. Collisions are detected correctly most of the time but occasionally the player ...
0
votes
1answer
87 views

Collision between UI element and GameObject

When I first started to develop in Unity I followed the Unity Tutorial for the Space Shooter 2D game and used the knowledge from that to create something myself. Looking at it now it may not have been ...
4
votes
1answer
102 views

Should particles check if they are in a region, or regions if particles are in them?

I have around 100 to 200 particles in my game. Then I have 5 to 20 regions (circle-shape) which should count the particles which enter them and add some force to them, so they change their direction. ...
1
vote
2answers
108 views

How to destroy bullet on collision but only after it makes the collided object to bounce?

I made a scenario that shooting a bullets on crates make them both bounce nicely (both the bullet and crates are RigidBody2D & Colliders). When I use OnCollisionEnter2D to destroy the bullet when ...
1
vote
1answer
71 views

How could I implement destruction of bases in Space Invaders type game?

What approaches could you use to implement the the gradual destructions of bases/shields in a top down shooter type game similar to Space Invaders? The simplest approach could be to use a series of ...
0
votes
2answers
49 views

how to recieve a trigger with collider or recieve a trigger with collider in unity

i know if your object has a Collider you can sense another Collider with OnCollisionEnter function or... and you can sense another collider with trigger with OncollsionEnter function and... but i want ...
0
votes
1answer
47 views

Play an effect where a sprite touches a trigger

I have a sprite-based GameObject in Unity to which is attached a RigidBody and a Collider2D. When this GameObject comes into contact with a particular Collider2D Trigger, I want a particle effect to ...
0
votes
2answers
132 views

Picking a 2D Box Collider with the mouse in Unity

I have a scene with a bunch of 2D doors that have 2d Box Colliders (no trigger) on them and that live on a Canvas. I would like to be able to click on them with the mouse, but have had no luck. ...
0
votes
0answers
33 views

Doing collisions on both axis with java overlap

I'm making a top down game from scratch and just found out about the java rectangle overlap method that would work great for collisions. However, after the overlap happens, I need to check for which ...