Collision detection is the determination of whether or not two or more entities make contact with each other during gameplay.
0
votes
1answer
27 views
resolving per pixel collision issue
In space invader, I'm doing bullet to barrier intersection using rect to rect, then I'm testing the first bullet's impact pixel, if it's green I blast a circle, if it's black, it continues travelling. ...
1
vote
0answers
18 views
How to implement this collision detection function?
I would like to know how to implement this collision detection function, but I'm not even sure what it's called.
The input shapes are 2D convex polygons, with an optional "rounding radius": imagine ...
0
votes
1answer
34 views
missiles skip in collision detection
I'm trying to work on spaceinvader. I have problem that missiles or the bullets skip frames due to its fast speed. I tried to use the previous position of the bullet in the collision check, but still, ...
0
votes
0answers
31 views
Problem with collision detection , Libgdx
I have a main character called main_sprite and I need to check for collision with another object called enemySprite . In case there is a collision, it should set velocity to 0. Here are my classes :
...
0
votes
2answers
54 views
Fast Ray Sphere collision code
I am looking at here and while it's well organized a lot of links are broken:
http://www.realtimerendering.com/intersections.html
I am trying to find fast code that will give me the hit point and the ...
0
votes
1answer
31 views
Moving OBB vs. triangle intersection test
Requirements: to write a test function that, given a moving OBB (oriented bounding box) and a triangle, returns true whenever the OBB hits the triangle.
The OBB is described by its half extents (h1, ...
0
votes
1answer
35 views
OnCollisionEnter2D incorrect contact point?
I am trying to shoot a bullet (rigidbody2d, boxcollider2d) to another enemy object (rigidbody2d, kinematic, circlecollider2d). I want the collision point between these two. When they collide, i want a ...
1
vote
1answer
32 views
How do I make my main character move towards an object? LibGDX/Java
What I want to happen is for my player to bounce from spring to another. For example take the illustration below:
Here's my code (what I've tried to do so far). This gets called in an ...
0
votes
1answer
44 views
Unity Collision Difficulties (How do I make a ground in unity with lots of pieces that doesn't have poor collision?)
So I'm working on this game that I came up with the idea for while watching the Unity Roll-a-ball tutorials. So it's probably important to note that I'm extremely new to game design and I don't have a ...
0
votes
3answers
125 views
Collision between AABB and Circle
I'm programming collision systems for a 2D game engine. The idea is that different systems can interact with each other. So one of the cases would be check collisions between axis aligned bounding box ...
0
votes
0answers
18 views
Colliding wiith a smooth line of blocks
I'm having a strange problem. I'm creating a 2D platformer, and creating the gameplay map by reading a csv file and placing prefabs of the appropriate type on map.
One part of the map is a simple ...
0
votes
1answer
16 views
Collision detection using gluunproject
I recently came across the game turbo tunnel. I want to make a similar game.
only thing that stands in my way is the collision detection. I first thought of learning plane line collision detection. ...
1
vote
1answer
60 views
Help with Resolving Pixel Perfect Collision
Hi I'm having trouble resolving "Collision detection between axis-aligned bounding box and bitmap (pixel perfect) terrain on a Worms type game". (Read previous question to find more information about ...
0
votes
1answer
56 views
How do I make a time lapse in my code so it updates slower?
I have made some collision if statements, but they didn't work.
birdbox3.X += 5;
birdbox3.Y -= 5;
if (birdbox3.Intersects(Banner1)) {
birdbox3.Y ...
0
votes
1answer
60 views
Collision Detection algorithm using Line Detection
For a 2D physics sandbox I am working on, I need a way of detecting detecting a collision using lines. This sandbox uses a class called Particle, which has a x and a y (stored as a struct called ...
0
votes
0answers
20 views
Does unused 2D colliders in Unity affects performance? Is an Edge Collider more performance friendly than BoxCollider2D?
I am using a lot of gameobjects for my platformer that uses BoxCollider2D component to make the scene floor.
But only an a selected set of gameobjects actually have some interaction with the player, ...
1
vote
2answers
82 views
Breakout Collision Detection: Ball gets trapped inside block
I'm writing a breakout clone where blocks to hit can be of various sizes and the projectile can move at different speeds, and I seem to be having some trouble getting the collision detection perfectly ...
1
vote
2answers
95 views
How to resolve collision between a dynamic AABB and static AABB?
I wanted to ask, how do I resolve collision between 2 cubes - in my case I want to push a moving / dynamic cube (used for the player) out of another static cube (used for the floor or objects in the ...
2
votes
1answer
36 views
Collision detection between axis-aligned bounding box and bitmap (pixel perfect) terrain
Working on a Worms-type game, I have my objects in bounding boxes and they sit on the pixel terrain.
Currently I am able to successfully do the collision detection for objects when they enter the ...
0
votes
1answer
38 views
Rotate a plane defined by its normal and its distance
First apologies for the amount of pictures, it's a bit hard trying to explain my problem without pictures. Hope I've provided all the relevant code. If you feel you want to know about how I am doing ...
0
votes
2answers
114 views
How to stop objects pushing each other away on collision?
I'm creating something along the lines of Super Smash Brothers. There's a problem with the collision between the two players and projectiles.
We have rigid body on the characters and projectiles and ...
0
votes
0answers
29 views
Sprite collision Rectangles LibGDX
I have a big problem with my sprite top collision. Here ismy constructor
public CoolGuy(){
full = new Rectangle(0, 0, 50, 98);
bottom = new Rectangle(0, 0, 50, 15);
top = new Rectangle(0, ...
0
votes
2answers
95 views
Basic 2d platform collision detection algorithm has a slight bug (Java)
I'm trying to implement collision detection between Player (the main character) and a Platform. They are both modelled as rectangles; when player hits the side of a platform he should bounce off it ...
5
votes
1answer
251 views
Get normal dependent on collisions position
As I hask ask here I'm working on how my objects can move over the terrain and other objects. My proposal and also an idea in the answers was to calculate the rotation from the object with the normals ...
0
votes
0answers
45 views
I have an array of blasts and an array of zombies, how can I efficiently detect collisions? [duplicate]
I have an array of blasts, and an array of zombies, but I'm struggling to find a way to efficiently detect collisions and remove both the blasts and zombies that have collided. Any suggestions?
...
0
votes
1answer
39 views
Determine if Plane is seen by Camera
If I have an arbitrary plane (center and normal) or a quad (center, normal and width and height) and a camera (frustum, projection & view matrix, etc). Then how would I go about calculating if the ...
0
votes
2answers
138 views
How to move a car over an environment
At the moment I'm writing a little OpenGL application. For now I have a car which can drive down a road. This works really good because I simply put the car on the street plane. Now let's say on the ...
0
votes
0answers
43 views
How can I handle ball interaction with lanes in a pinball game?
In a pinball game, how can I handle collision or constraints on the ball for convincing movement on those highway rails/tracks?
I assume using physics and a mesh collider would not work, even when ...
-1
votes
1answer
32 views
3D OBB vs OBB Collision Detection and Response
I need to know how to do collision detection and response for 2 3D OBB objects. I will also need to be able to have certain objects disabled (no collision, incase I need to test something like a ...
1
vote
0answers
52 views
Collision Detection Between 3 or More Objects
Say I have a 2D grid of particles, and I wanted to find out if any of them were colliding. In my head I have come up with a system where you check every possible location for each particle in that ...
0
votes
2answers
87 views
Collision detection with moving tilemap
I have a player whose who's sprite is 48* 32. I know the player's position. The player can move up and down based on user input.
I have a tilemap which moves. Here is an example of the array I use to ...
-1
votes
1answer
32 views
how to determine wall direction with information of normal and incoming direction
what is formula ( and theory behind) used to determine wall direction with only knowing the normal of wall and incoming direction object.
in this thread example :Collision detection - Smooth wall ...
0
votes
1answer
53 views
Double buffer - Managing Collision
I'm thinking about how I should manage collisions in my game. I'm thinking about having a "Collision" class that checks for collision, and in case takes actions to resolve them.
My problem is this:
...
1
vote
3answers
92 views
unity destroy enemy when jumping on it
I am creating a 2D platformer using Unity3D, I want to have the player destroy enemies when it jumps/falls over them (just from the top). But I have been having problems trying to implement this. I ...
1
vote
3answers
39 views
XNA - How to use One Rectangle in sprites for collisions
I'm new to XNA and game development in general. If I want to make an object solid so my character cannot pass through it, I would use several Rectangles to make the collision more "realistic"
What I ...
0
votes
1answer
83 views
Find closest point on NavMesh if current target unreachable
I have a mock environment set up with a cube that has a specified "Not Walkable" layer.
I'm using NavMeshAgent and NavMeshPath to set destinations of the player.
The way I'm setting paths is by ...
1
vote
1answer
70 views
OnMouseUpAsButton not always called
I'm working on a 2D implementation of Free Cell in Unity 4.6.1, and I'm having trouble getting my click-detection code working consistently. The code below should be called every time a card is ...
1
vote
1answer
92 views
Player Gravity Questions
I've made it so that all entities have complex box colliders for hit detection purposes. These entities also have character controllers on them. The problem? Gravity, or lack thereof. When the ...
1
vote
0answers
25 views
Is there a way to rotate an Ellipse in libGDX for collision detection purposes?
I'm trying to avoid having multiple overlapping Circles for a UFO-shaped sprite.
Two Ellipse objects will perfectly cover the shape of my UFO, but I want to tilt/rotate the UFO when flying left and ...
0
votes
0answers
27 views
Check if object is at position, then move player as close to object without colliding, or re-direct player?
Basically what the title says, I'm using the mouse position to move the player around the screen, and the issue I'm having is that if there is, let's say, a boulder where I'm trying to run, how would ...
0
votes
1answer
73 views
Unity: Smooth collision
I'm making a topdown 2D RPG in Unity.
All moveable objects have Rigidbody2D-components with gravity set to 0, linear drag set to 5 and different masses.
Walls are stationary boxes with BoxCollider2Ds.
...
0
votes
1answer
44 views
How to retrieve vertex information from ID3DXMesh
I need to know the position of each vertex (and triangles) from a mesh (a pointer to ID3DXMesh, created by calling functions like D3DXCreateBox, D3DXCreateTeapot and D3DXCreateSphere) to perform some ...
0
votes
2answers
63 views
How to flick gameObject using Touch?
I've been searching for a solution for my problem for a while on the web, but i didn't find anything that work properly
What i want to do
I have a bouncing ball and I want to let the user flick it ...
0
votes
2answers
61 views
Collision detection between draggable object and world objects?
I have a game I'm making in Javascript that will involve combining items by dragging and dropping them onto each other. Think Alchemy or similar.
So far, so good, but I hit a snag while trying to ...
0
votes
1answer
61 views
Is it possible to tile box colliders without causing “false” collisions in Unity3D?
This is in regards to something like a sidescroller where you have a tiled map where each tile uses a 2d box collider.
If you use a 2d circular collider as an example for your character, as it rolls ...
3
votes
1answer
239 views
Acute corner - Collision Detection
So I have set up a Swept test for AABB vs Line Collision that works fine, now the problem is that I have to deal with acute corners, where this happens:
As you can see the AABB just falls through ...
0
votes
1answer
47 views
How to determine whether a given line intercepts another
I have a collection of lines:
List<Line> _lines;
Each has the properties: X1, X2, Y1, Y2
How can I determine whether any given line in the list (Line[n]) intercepts, at any point, any other ...
0
votes
0answers
62 views
Collision detection in JavaScript Canvas game - Issue with 'if' statements [duplicate]
I am currently developing a simple browser-based game and seem to be on the cusp of collision detection that doesn't just return the player to where they were before, but actually will slide them ...
1
vote
3answers
105 views
How Efficiently preform collision detection in NxN rectangle grid
i have simple level that constructed from NxN rectangle grid
some of the rectangles are walls and some of them are the path
the player allowed to move only on the path they are also rectangle from the ...
-2
votes
1answer
87 views
How can I get “Good enough” collision for entities? [closed]
I am developing a Pirate ship fighting game.
It's a great concept: Ships firing cannonballs, sinking each other, having to work as a team to complete the mission... But.. I've tested it with about ...