Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
5k views

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....
Brock Woolf's user avatar
  • 47.4k
3 votes
4 answers
4k views

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 ...
user159419's user avatar
2 votes
3 answers
6k views

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 ...
Patrick's user avatar
  • 5,622
1 vote
3 answers
2k views

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. ...
Brock Woolf's user avatar
  • 47.4k
4 votes
1 answer
6k views

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 :) ...
Sejanus's user avatar
  • 3,343
3 votes
2 answers
2k views

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 ...
CodeJustin.com's user avatar
24 votes
4 answers
25k views

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 ...
Nick Sonneveld's user avatar
18 votes
7 answers
7k views

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, ...
x26's user avatar
  • 181
233 votes
31 answers
197k views

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 ...
Mizipzor's user avatar
  • 52.7k
1 vote
1 answer
2k views

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 ...
user avatar
4 votes
3 answers
6k views

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 ...
a_m0d's user avatar
  • 12.2k
0 votes
1 answer
2k views

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 ...
Bastien Léonard's user avatar
3 votes
3 answers
1k views

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 ...
Bruno's user avatar
  • 4,527
14 votes
5 answers
9k views

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 ...
JonBWalsh's user avatar
  • 321
4 votes
3 answers
4k views

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 ...
Andrew Hundt's user avatar
  • 2,650
10 votes
5 answers
13k views

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 ...
kpozin's user avatar
  • 27.2k
4 votes
4 answers
3k views

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 ...
user avatar
0 votes
1 answer
165 views

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); ...
Chris Stryker's user avatar
-1 votes
2 answers
992 views

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-...
user avatar
1 vote
3 answers
3k views

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), ...
Bevin's user avatar
  • 972
1 vote
3 answers
2k views

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 ...
user avatar
7 votes
7 answers
20k views

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 ...
user avatar
6 votes
5 answers
11k views

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....
Michael Labbé's user avatar
1 vote
2 answers
2k views

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 ...
Abhijeet's user avatar
  • 151
15 votes
6 answers
16k views

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 ...
Oli's user avatar
  • 228
3 votes
4 answers
974 views

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 ...
kender's user avatar
  • 87.6k
21 votes
0 answers
26k views

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 ...
William's user avatar
  • 8,898
6 votes
1 answer
2k views

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?
eflles's user avatar
  • 6,896
3 votes
2 answers
6k views

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)...
Andreas Grech's user avatar
35 votes
13 answers
5k views

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 ...
mmcdole's user avatar
  • 93.2k
2 votes
1 answer
832 views

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 ...
falstro's user avatar
  • 35.9k
15 votes
5 answers
10k views

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? ...
Andru Luvisi's user avatar
  • 25.6k
15 votes
3 answers
9k views

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 ...
mmcdole's user avatar
  • 93.2k
254 votes
27 answers
280k views

How can I tell whether a circle and a rectangle intersect in 2D Euclidean space? (i.e. classic 2D geometry)
aib's user avatar
  • 47.4k
2 votes
5 answers
3k views

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 ...
friism's user avatar
  • 19.3k
280 votes
15 answers
211k views

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

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

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 ...
esiegel's user avatar
  • 1,783
626 votes
42 answers
477k views

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.
Scott Evernden's user avatar
7 votes
7 answers
24k views

Can someone explain the pros and cons of it and any math involved with it?
user avatar
5 votes
5 answers
8k views

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), ...
Martin's user avatar
  • 6,025
3 votes
6 answers
22k views

Whats the best way to detect collisions in a 2d game sprites? I am currently working in allegro and G++
Abhishek Mishra's user avatar
11 votes
5 answers
9k views

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 ...
borrego's user avatar
  • 739

1
85 86 87 88
89