4,443 questions
2
votes
2
answers
5k
views
Detect Collision point between a mesh and a sphere?
I am writing a physics simulation using Ogre and MOC.
I have a sphere that I shoot from the camera's position and it travels in the direction the camera is facing by using the camera's forward vector....
3
votes
4
answers
4k
views
Collision detection using MeshGeometry3D
I am creating a CAD like program, creating modelvisual3D objects. How do i do collision detection between my objects(modelvisual3d) using MeshGeometry3D. Do i have to compare every triangle in the ...
2
votes
3
answers
6k
views
C# 2D collision detection problem
I am stuck trying to figure out how to alter my collision detection to work correctly, i got all my wall objects stacked inside a List and then when the player moves i loop thru each wall object and ...
1
vote
3
answers
2k
views
Integrate Custom Physics Classes with OGRE 3D?
I have to use OGRE3D for a university project however, we are not allowed to use any third party libraries for Physics or collision detection. This includes using OGRE's built in collision detection.
...
4
votes
1
answer
6k
views
collision detection with lots of objects
I have around several hundreds of moving objects within screen at the given time, plus a thousand+ stationary objects. For simplicity, you can think of it as a billiard game with damn lots of balls :) ...
3
votes
2
answers
2k
views
How do you do "bouncing" collision detection with Actionscript 3.0? (With Video)
Well first off I'm surprised actionscript 3.0 doesnt have pixel-based collision detection.
Anyways I'm using a collision library found here (I'm willing to pick another library if needed)
I recorded ...
24
votes
4
answers
25k
views
How did older games do collision detection with walls, floors and ceilings?
I have been reading about collision detection in games on stackoverflow and other sites. A lot of them talk about BSPs, bounding elipses, integration etc. However, on the NES, they managed to do ...
18
votes
7
answers
7k
views
Continuous collision detection between two moving tetrahedra
My question is fairly simple. I have two tetrahedra, each with a current position, a linear speed in space, an angular velocity and a center of mass (center of rotation, actually).
Having this data, ...
233
votes
31
answers
197k
views
Circle line-segment collision detection algorithm?
I have a line from A to B and a circle positioned at C with the radius R.
What is a good algorithm to use to check whether the line intersects the circle? And at what coordinate along the circles ...
1
vote
1
answer
2k
views
iphone collision detection problem using chipmunk
I have 2 slight problems :
chipmunk collision detection : i'm developping a game where i detect collisions between a ball and some static polygon shapes.
this is working but "partially", meaning that ...
4
votes
3
answers
6k
views
Simple 2d physics tutorial for terrain collision detection [closed]
I am looking for a tutorial which will show me how to do simple 2d physics like the ones in this (http://www.teagames.com/games/tgmotocross/play.php). The part that I am most interested in is how the ...
0
votes
1
answer
2k
views
XNA collision detection [closed]
I have a ball moving inside a cube, and I detect when it goes outside of the cube (with a bounding sphere and a bounding box).
Now I would like to detect from which side the ball goes out. Then I ...
3
votes
3
answers
1k
views
Should games rely on frame rate only?
I would like your suggestion about this problem...
To make it simple, I'll consider only the x axis.
Image an object in position 10, and its width also 10 units, which is moving forward 100 units ...
14
votes
5
answers
9k
views
How to subdivide a 2d game world for better collision detection
I'm developing a game which features a sizeable square 2d playing area. The gaming area is tileless with bounded sides (no wrapping around). I am trying to figure out how I can best divide up this ...
4
votes
3
answers
4k
views
Ball to Ball Collision - Gains significant velocity upon collision
I implemented the code from the question "Ball to Ball Collision - Detection and Handling" in Objective-C. However, whenever the balls collide at an angle their velocity increases dramatically. All of ...
10
votes
5
answers
13k
views
Basic pathfinding with obstacle avoidance in a continuous 2D space
I'm writing a simulation in which a creature object should be able to move towards some other arbitrary object in the environment, sliding around obstacles rather than doing any intelligent ...
4
votes
4
answers
3k
views
Fast Collision Detection for Circle Insertion into 2D Plane
I know there are lots of posts about collision detection generally for sprites moving about a 2D plane, but my question is slightly different.
I'm inserting circles into a 2D plane. The circles have ...
0
votes
1
answer
165
views
Tiled movement in C++
here's what I'm working with now
if (osl_keys->held.down)
{
sprite_position = DOWN;
SpriteAnimate();
sceKernelDelayThread(20000);
sprite->y += 16;
SpriteAnimate();
sceKernelDelayThread(20000);
...
-1
votes
2
answers
992
views
Pygame - Different sided collision question! [duplicate]
I'm making a Pygame of, basically, "Breakout".
I'm using collisions, and want a simple way to have different bounce effects of the different sides of one rectangle.
What I currently have for the ball-...
1
vote
3
answers
3k
views
Per-pixel collision problem in C#
I am writing a small 2d game engine in C# for my own purposes, and it works fine except for the sprite collision detection. I've decided to make it a per-pixel detection (easiest for me to implement), ...
1
vote
3
answers
2k
views
How do I reverse the direction that my rectangles travel?
I am very new at programming as it was only just introduced into my school as a subject and I need some help. I have been given the task to have an animation of three balls (rectangle images) bouncing ...
7
votes
7
answers
20k
views
How do I create collision detections for my bouncing balls?
I have coded an animation (in python) for three beach balls to bounce around a screen. I now wish to have them all collide and be able to bounce off each other. I would really appreciate any help that ...
6
votes
5
answers
11k
views
How do I test for collision of two moving 2d oriented bounding boxes?
The OBBs have a position(x,y), a velocity(x,y) and an orientation(Matrix). Given periodic updates, the OBBs must collide with each other, returning the fraction of the move that was deemed successful....
1
vote
2
answers
2k
views
How to implement ball movement using vector formula?
I am doing ping pong game where I have to move ball and detect collision with outside boundary and also with moving paddle. I want to implement it using vector and not by trigonometry.
I am very weak ...
15
votes
6
answers
16k
views
Fast circle collision detection
I'm trying to write a method that will calculate if two circles are overlapping. I've come up with the following and I'm just curious to know if there is anyway it could be optimised further.
private ...
3
votes
4
answers
974
views
In what way would you present an algorithm to detect collisions between different objects?
While working on a really only-for-fun project I encountered some problem.
There is a 2D world populated with Round Balls, Pointy Triangles and Skinny Lines (and other wildlife too, maybe). They all ...
21
votes
0
answers
26k
views
How can I perform Collision Detection on rotated rectangles? [closed]
Okay, I'm trying to write a program that could tell me if any points in a 30x100 rectangle rotated to 140 degrees are inside another 30x100 rectangle rotated to 200 degrees.
Honestly, I don't even ...
6
votes
1
answer
2k
views
Downsizing a Texture2D in XNA
I would like to downsize a Texture2D object to another Texture2D object in XNA.
The reason is to use the downsized object for pixel based collision detection.
Can this be done?
3
votes
2
answers
6k
views
WPF: Collision Detection with Rotated Squares
With reference to this programming game I am currently building.
Thanks to the answers from this post, I am now able to find the x-y coordinates of all the points of the rectangles (even when rotated)...
35
votes
13
answers
5k
views
How can I optimize my basic physics simulator?
I've written a simple physics modeler that allows me to bounce balls around the screen. You can click and drag to launch a ball, or you can generate balls hundreds at a time and watch them interact ...
2
votes
1
answer
832
views
Collision detection with hardware generated primitives
There's a lot of literature on collision detection, and I've read at least a big enough portion of it to be fairly familiar with most techniques. However, there's something that has eluded me for a ...
15
votes
5
answers
10k
views
Collisions between game objects and the floor with regards to gravity?
How do games with gravity handle the relationship between moving things like players, monsters, or objects and the floor? Is the player constantly "falling into" the floor and being bounced back up? ...
15
votes
3
answers
9k
views
What technique should be used to prune 2d collision checks?
From the outset, collision detection feels like it is an O(n^2) problem.
You have a bunch of objects and you need to check if each object is colliding with any of the other objects. However, I ...
254
votes
27
answers
280k
views
Circle-Rectangle collision detection (intersection)
How can I tell whether a circle and a rectangle intersect in 2D Euclidean space? (i.e. classic 2D geometry)
2
votes
5
answers
3k
views
Elastic collision between oblique wall and ball
I'm having trouble computing reflection angles for a ball hitting an oblique wall. I'm using an algorithm lifted from this tutorial. It looks like this (in Actionscript 3), with p1 being the current ...
280
votes
15
answers
211k
views
Ball to Ball Collision - Detection and Handling
With the help of the Stack Overflow community I've written a pretty basic-but fun physics simulator.
You click and drag the mouse to launch a ball. It will bounce around and eventually stop on the &...
15
votes
12
answers
128k
views
Collision Detection between two images in Java
I have two characters displayed in a game I am writing, the player and the enemy. defined as such:
public void player(Graphics g) {
g.drawImage(plimg, x, y, this);
}
public void enemy(Graphics g)...
21
votes
5
answers
6k
views
Spatial Data Structures for moving objects?
I was wondering what is the best data structure to deal with a lot of moving objects(spheres, triangles, boxes, points, etc)? I'm trying to answer two questions, Nearest Neighbor and Collsion ...
626
votes
42
answers
477k
views
How can I determine whether a 2D Point is within a Polygon?
I'm trying to create a fast 2D point inside polygon algorithm, for use in hit-testing (e.g. Polygon.contains(p:Point)). Suggestions for effective techniques would be appreciated.
7
votes
7
answers
24k
views
Can someone explain per-pixel collision detection?
Can someone explain the pros and cons of it and any math involved with it?
5
votes
5
answers
8k
views
Point-Triangle Collision Detection in 3D
How do I correct for floating point error in the following physical simulation:
Original point (x, y, z),
Desired point (x', y', z') after forces are applied.
Two triangles (A, B, C) and (B, C, D), ...
3
votes
6
answers
22k
views
Best way to detect collision between sprites?
Whats the best way to detect collisions in a 2d game sprites? I am currently working in allegro and G++
11
votes
5
answers
9k
views
Resources of techniques use for collision detection in 2D? [closed]
What are in your opinion the best resources (books or web pages) describing algorithms or techniques to use for collision detection in a 2D environment?
I'm just eager to learn different techniques ...