1
vote
0answers
44 views

Resolving penentration after collision using Separating Axis Thereom

I implemented collision detection in my game using SAT. The detection works, but I'm trying to use the algorithm to figure out the penetration vector of the two OBBs and push them apart (before doing ...
0
votes
0answers
56 views

Using Bullet physics engine to find the moment of object contact before penetration

I would like to use Bullet Physics engine to simulate the objects in 3D world. One of the objects in the world will move using the position from 3D mouse control. I will call it "Mouse Object" and ...
0
votes
1answer
113 views

Integration error in high velocity

I've implemented a simple simulation of two planets (simple 2D disks really) in which the only force is gravity and there is also collision detection/response (collisions are completely elastic). I ...
1
vote
1answer
111 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 ...
18
votes
6answers
2k views

How to optimize the distance function?

While developing a reasonably simple RTS-like game, I noticed my distance calculations were causing an impact in performance. At all times, there are distance checks to know if a unit is in range to ...
2
votes
1answer
103 views

How do I compute the point of a triangle-ray intersection?

I have a line (the direction vector of the player) and a triangle representing the face of a model (so composed of 3 points). I can't find the mathematical operation to check if that vector is ...
1
vote
1answer
68 views

Shape collision checking

I want to check in an shape, wether an point is in it or not. The shape is descriped with one Array of float vectors. The vectors are added in clock direction. The first I can check very easy, the ...
0
votes
1answer
161 views

Predicting trajectory collisions for multiple moving objects [duplicate]

For the most simple of 2D games, I have implemented a posteriori collision detection (overlapping rectangles) on the xy Cartesian plane, but am now interested in understanding the basics of a priori ...
6
votes
1answer
197 views

Finding roots/zeros for collision detection?

For the most simple of 2D games, I have implemented a posteriori collision detection (overlapping rectangles) on the x/y Cartesian plane, but am now interested in understanding the basics of a priori ...
0
votes
2answers
217 views

How to detect collision between a camera and a mesh?

I am wondering how you would be able to extract mesh properties (i.e. faces, vertices, and vertex normals) and use them to create a collidable object, one that a camera can't go through ? I am using ...
2
votes
1answer
227 views

Circle to Circle collision - bad accuracy

Circle1 (blue) is moving and its X and Y bounds are the screen (meaning it bounces off the walls). Circle2 (black) is stationary. Circle1(blue) is supposed to bounce off of Circle2 without ...
2
votes
1answer
270 views

Project collision shapes to plane for 2.5D collision detection

I am working on a top down 2.5D game. In the game anything that overlaps on the screen should be 'colliding' with each other regardless of whether they are on the same plane in the 3D world. This is ...
0
votes
1answer
213 views

Performing intersection testing in world's or object's space?

Am adding basic ray casting and collision detection for my game, also adding bounding volumes/collision mesh. Given that the ray is cast in world space and each mesh's node can track world ...
3
votes
1answer
212 views

Collision detection in games in 3D - edge to edge cross product

I am having trouble understanding why, in a game collision detection, separating axis determination requires checking for the cross product of edges of the two polytopes as additional potential ...
4
votes
3answers
517 views

Fast method of detecting whether point is inside mesh

I'm trying to construct a 3d object from a large number of particles. I think this is called BVH (Bounding volume hierarchy). I figured the best way is to draw the particles inside the mesh, then let ...
0
votes
1answer
318 views

How do I detect the intersection of a curve with itself?

I'm developing a game in which the player can draw a line. I want to detect if that line intersects with itself. How would I do this?
0
votes
1answer
117 views

Find the footprint of an isometric entity

I'm working on making a 2D isometric engine in Java. I'm getting into collision detection and I've hit a bit of a problem. Characters in-game are not restricted to movement from tile to tile - they ...
2
votes
1answer
358 views

Min/Max of two vectors?

This seems like a simple question, but i'm having trouble searching the internet for it. In XNA, during a collision detecting method, I would determin the minimum of some vectors. // Get the minimum ...
0
votes
1answer
217 views

Normalizing the direction to check if able to move

i have a a room with 4 walls along the x and z axis respectively. My player who is in first person (therefore the camera) should have collision detection with these walls. I'm relatively new to this ...
7
votes
1answer
2k views

Why doesn't Unity's OnCollisionEnter give me surface normals, and what's the most reliable way to get them?

Unity's on collision event gives you a Collision object that gives you some information about the collision that happened (including a list of ContactPoints with hit normals). But what you don't get ...
4
votes
3answers
315 views

How to get distance from point to line with distinction between side of line?

I'm making a 2d racing game. I'm taking the nice standard approach of having a set of points defining the center of the track and detecting whether the car is off the track by detecting its distance ...
6
votes
2answers
395 views

How to make my character slide (not bounce) off a slope

My character needs to slide and not bounce off a slope. The solutions I found here use a Reflection vector, but they make my character bouncy when they run downwards a slope. var reflectVector = ...
1
vote
0answers
62 views

obb vs obb and resolve/response for 2d space game [duplicate]

Possible Duplicate: OBB vs OBB Collision Detection How can i detect if an rotated obb intersects another rotated obb and resolve it so both obb objects dont go further into each other. I ...
-1
votes
2answers
358 views

How should I learn about collision detection?

If I want to use physics engine for my game then how should I go to learn collision-detection algorithms? When I read AI book for games, the book talks about collision detection, so I want to learn ...
1
vote
3answers
1k views

Checking for collisions on a 3D heightmap

I have a 3D heightmap drawn using OpenGL (which isn't important). It's represented by a 2D array of height data. To draw this I go through the array using each point as a vertex. Three vertices are ...
0
votes
2answers
393 views

Collision, then what?

I know how to check collision for example 2 spheres. But my question is how do I use the collsion response in a good way? How do I make my character unable to walk in to the Sphere? I've got to the ...
6
votes
3answers
1k views

How can I do fast Triangle/Square vs Triangle collision detection?

I have a game world where the objects are in a grid based environment with the following restrictions. All of the triangles are 45-90-45 triangles that are unit length. They can only rotate 90°. The ...
3
votes
3answers
371 views

How do I approach this collision model?

This is the game level prototype I have already implemented. It has few objects per room to allow me to finally add some collision detection/response code into it. VIDEO As you can probably see, ...
6
votes
1answer
825 views

AABB - AABB Collision, which face do I hit?

To allow my objects to slide when they collide, I need to : Know which face of the AABB they collide with. Calculate the normal to that face. Return the normal and calculate the impulse that to ...
2
votes
3answers
2k views

Line segment and Sphere intersect

How can I check it if a line3D/ or ray is intersecting a sphere?
0
votes
2answers
532 views

Ways to define a curve

I'm trying to give shapes in my physics engine roundness/ curvature. I am aware of various methods for mathematically defining curves; such as bezier-cruves, ellipses, etc. However I am not sure ...
9
votes
1answer
368 views

Deforming surfaces

I try to accomplish an deforming physic behaviour for levelsurfaces, but don't get an idea how to start with the implemenation so far. Regardless of the shape from the surface (planes, cubes, ...
1
vote
1answer
1k views

Line segment / circle intersection - X value seems wrong?

Major Edit I'm making a Breakout clone, and having difficulty with collision detection between a circle and line segment. Apologies, my earlier question was a result of frustration and no sleep :) ...
9
votes
1answer
3k views

Circle-Line Collision Detection Problem

I am currently developing a breakout clone and I have hit a roadblock in getting collision detection between a ball (circle) and a brick (convex polygon) working correctly. I am using a Circle-Line ...
0
votes
1answer
390 views

What maths should I learn for game programming, and what aspect of programming does it relate to? [duplicate]

Possible Duplicate: What math should all game programmers know? Obviously a good knowledge of maths is essential for good programming, my maths isn’t the best ( I didn’t pay attention in ...
31
votes
3answers
3k views

A ball hits the corner, where will it deflect?

I need to brush up my trigonometry and hope you can help here with a simple mathematical model. Here is my model so far in the image attached. I am aware that the frame animation has other problems ...
1
vote
2answers
2k views

Voronoi regions of a (convex) polygon

I'm looking to add circle-polygon collisions to my Separating Axis Theorem collision detection. The metanet software tutorial (http://www.metanetsoftware.com/technique/tutorialA.html#section3) on ...
4
votes
2answers
411 views

How to detect and collide two elastic line segments?

There are 4 moving physical nodes in 3D space. They are paired with two elastic line segments / strings (1 <-> 2; 3 <-> 4). Part I: How to detect the collision of two segments? Part II: On the ...
5
votes
1answer
805 views

How to calculate new direction after sprite collision

The scenario as you can see in the picture. A ball will be hitting a surface and I want to fairly correctly get the new angle after the collision.. I expect to know the X,Y coordinates of the lines ...
7
votes
4answers
1k views

Implementing 2D CSG (for collision shapes)?

Are there any simple (or well documented) algorithms for basic CSG operations on 2D polygons? I'm looking for a way to 'add' a number of overlapping 2D collision shapes. These may be convex or ...
17
votes
3answers
739 views

Building a Plattformer - How to determine if a player is allowed to jump?

I'm building a simple Plattformer Jump n' Run Style game. I do not use tiles - instead i've geometrical shapes for my level entities (and the player is one too). I finished my collision detection code ...