The point or points at which two or more shapes cross or overlap one another.
0
votes
0answers
34 views
Get Edges of Intersection Line from Tr-iTri Overlap Algorithm
Hi I have the following code, which finds the intersection between two triangles, and returns the two points making up the intersection line (out Vector3 isectpt1, out Vector3 isectpt2).
I would like ...
0
votes
2answers
65 views
line segment triangular-prism intersection
What is the best way how to perform intersection test between triangular-prism (used as bounding "box") and line-segment (NOT ray)? The triangular prism is not axis-aligned and it is stored as a ...
0
votes
1answer
91 views
Möller-Trumbore false positive result in specific point
I copied code from this whitepaper and i can't figure out while it gives me false-positive intersections.
Here's problematic values:
Triangle points: (100.0, 100.0, 100.0), (-100.0, 100.0, 100.0), (-...
2
votes
1answer
116 views
Physics for curved edges?
I'm learning how to program simple two-dimensional games in C++ using SFML, I've done a relatively simple pong game already I would like to ask how I could go about creating the physics for a curved ...
0
votes
1answer
26 views
Intersection of two limited planes (stripes)
Have two limited planes. That means just squares or stripe in 3D space (or two connected triangles on the same plane).
What i want to know is exactly how (and whether) they collide.
My first approach ...
0
votes
1answer
70 views
Overlap color between objects
I'm currently trying to build a game with Ogre3D that is basically a moving vehicle that leaves a green trail (2D manual mesh) in it's path, what i'm trying to achieve is exactly what this image shows:...
0
votes
1answer
55 views
Clamp point to triangle for sphere collision
I'm having some issues clamping a 3d to barycentric triangle. I've searched for some time now and keep seeing the same results, that (u,v,w) should be clamped between 0 and 1. But when I clamp those ...
6
votes
1answer
163 views
What is the fastest algorithm to check if two cubes intersect (where the cubes are not axis aligned)?
I am looking for an algorithm to check if two cubes intersect. One can check if each of the 6 faces of cube A are intersected by each of 12 edges of cube B, but that is 72 checks. I've heard there is ...
2
votes
1answer
89 views
I need to find intersection point of a vector in an axis aligned rectangle
I need some help, I have one vector in a rectangle like following
(Ops, first A2 point on the top should be A1, assume it is A1)
Let's say the vector is like above It doesn't have intersection point ...
1
vote
1answer
140 views
Best way to find line segment intersection
I need to find the point of intersection between two line segments in 2D space. I receive them in terms of both coordinates of both lines. Because they are line segments I would also need to know if ...
1
vote
1answer
53 views
What is the best way to check for intersection of two bounding boxes, given a minimum and maximum Vector3 for each one
I have a BoundingBox object which holds two Vector3's (x, y, z), one for the minimum point and one for the maximum point. (-1.5 0 9 | 1.5 3 10)
What is the best way to check for any intersection or ...
3
votes
2answers
592 views
How do I test for intersection between a ray and a cone?
I decided that writing a ray-tracer in my game was a brilliant idea, and so now I am looking for code to use for ray to primitive intersection tests. I have based my effort on this very nimble yet ...
1
vote
2answers
349 views
Section cut through (solid) geometry
I'm looking for image based (screen space) technique to render section cuts through arbitrary (solid) geometry. I found and studied image based CSG (Kirsch 05 / OpenCSG) but I found it to be perhaps a ...
4
votes
1answer
98 views
Get collision time between two moving, non uniform Axis Aligned bounding boxes
I have a problem finding the exact time of collision of two possibly moving or static objects. Both objects have AABB data (HalfExtents, Min, Max, Center vector and stuff) and a velocity vector. The ...
14
votes
3answers
2k views
How do I write a shader that lights up when objects are near a surface?
In this Overwatch gameplay video, the character's shield lights up white in areas that are near other objects' geometry.
Note the white edges on the blue shield, near the floor, walls and pillar.
I ...
3
votes
4answers
304 views
Intersection of a Line and a Rectangle
I have to calculate the intersection of a line segment (represented by 2 points) with a rectangle.
For example:
Axis aligned rectangle corners: (0, 0) (100, 100)
Point 1: (50, 50)
Point 2: (50, ...
5
votes
2answers
141 views
How to find out the vertices of the polyhedron formed by the overlapping area of two rotated boxes?
What is the most efficient way for finding out the vertices of the polyhedron formed by the overlapping area of two rotated 3D boxes?
If it is still confusing what I mean by "polyhedron formed by...",...
1
vote
0answers
48 views
Explanation of the parameters in the line intersection code
I am trying to understand a C code that moves the mesh nodes for each time step and i am totally struck on the parameters t1 and t2 please help me sorting this out.
So here is what the function gets (...
1
vote
1answer
447 views
Ray & Segment Intersection
I'm writing some code to check intersection between all of a rectangles segments and a ray. It will sometimes use the Left and Right side of the rectangle as the closest face hit (face DA & BC) ...
0
votes
0answers
51 views
Integer ops only 3D triangle-triangle collision detection
I've a need for 3D triangle-triangle collision detection using integer math only. Unfortunately, I'm not in a position where I can use 64-bit integers (only 32-bit) and my vertex values can be larger ...
3
votes
1answer
54 views
My intersect detector isn't working
I'm trying to create rooms dinamically by creating them in random places and checking if they do overlap each other. The idea is that if the new room intersects with another one, it must be recreated ...
1
vote
0answers
89 views
Cutting a 3D mesh with a 2D shape
I have a 2D image that i want to use to cut into a 3D mesh while leaving it closed (basically cut straight through it, and close it by generating vertices in both places it cut, front and back, to ...
0
votes
1answer
107 views
Advantages of “Overlap testing” and “Intersection testing”
I have been looking for advantages and disadvantages of both techniques, but I was only able to find a few disadvantages such as: Overlap testing may fail for objects moving very fast and Intersection ...
1
vote
3answers
647 views
Java 2D Game Hitbox Detection & Rounded Corners
I am working on a simple 2D game with Java, swing and no framework. I have a rectangular player that the user can move around. On the map are few obstacles which the player should not be able to go ...
2
votes
1answer
170 views
Rigidbody physics concept: Why translate collision shape on-the-fly instead of mutating it?
Crossposting at http://stackoverflow.com/questions/29993547/rigidbody-physics-concept-why-translate-collision-shape-on-the-fly-instead-of-m
I've spent some time going through physics engine's ...
0
votes
2answers
487 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
137 views
How to represent ray and line segment in parametric form?(Visibility)
I am trying to implement this algorithm but am not sure how I am supposed to represent my ray and my line segments(walls).
For the r_px/r_py do I just use the position of the light? For the r_dx/...
3
votes
2answers
343 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
0answers
78 views
Displaying intersection by removing vertices
I am using WPF, using the MeshGeometry3D class to build up my model.
I have 2 pipes intersecting each other, and I would like to remove the region of intersection (meaning erase the portion of pipe 1 ...
3
votes
2answers
348 views
Intersection between moving circle and some squares
I'm developing a 2D game made of squares.
What I need to do is check if a circle collides with any of the squares as it moves.
I have a raycast function to check the same idea, but using a point. I ...
0
votes
1answer
3k views
How to calculate ray polygon intersection? [duplicate]
I'm in a class where we are creating a ray tracer from the ground up in C++. I'm at a point where I can't seem to wrap my head around the math that is required to calculate the point at which a ray ...
1
vote
1answer
2k views
Collision/Intersection of (2D) Ray to Line Segment
Given a ray (r0, r1) and a line segment (a, b), I need to calculate the normal of the line segment based on the direction of the ray. For example, in the following picture:
The correct normal given ...
8
votes
2answers
663 views
How do I find the closest points(thereby forming a polygon) enclosing a particular point?(see image)
I am working with a game engine, and my task is to add code for simulating fracture of rigid meshes.
Right now I'm only working on breaking a cube.
I am using Voronoi's algorithm to make a (...
1
vote
1answer
118 views
Warp GameObject Size When Entering/Leaving Area
Below I have an image describing the desired functionality I am going for. Let's say you control a square and when you move this square into a given area, any part of your rigidbody/model inside of ...
3
votes
1answer
642 views
Explain this line segment intersection code
I've been reading this article on pathfinding over polygon meshes using line-of-sight, and in the article are several code snippets. One of them, the one I'm trying to understand, is a simple function ...
2
votes
2answers
878 views
Checking if a vector is contained inside a viewing frustum
I have a three dimensional pyramid given by four vectors a, b, c, d and want to test if a given vector x is inside that region or not. Here is an image:
A related question can be found here: 2D ...
0
votes
0answers
127 views
Precalculating timespan of bullet collision on cubic bezier curve circles?
I'm fairly new to game logics, C#/XNA (The language/library of choice) and bezier curves in general, and is stuck in my current project. I'm going to try to explain as thoroughly as I can what the ...
1
vote
1answer
677 views
Is this the correct way to detect ray-sphere intersection?
I have this java function that should return a true or false for any sphere passed to it if they intersect. However it seems to end being true a lot of the time when it shouldn't and false sometimes ...
0
votes
2answers
251 views
Thick Ray interaction with AABB
I would like to intersect a thick ray (actually a cylinder) with an AABB.
The current code to perform intersection with the ray is the following.
template <class RealT>
bool CAABB<RealT>:...
2
votes
1answer
343 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 ...
2
votes
2answers
513 views
How can I compute the common points when spheres intersect?
When two spheres intersect they should share one or two points. I want to know how to compute those points?
I was thinking of something like this:
-check if the spheres intersect
-calculate radius_1 ...
0
votes
1answer
278 views
Tennis game algorithm and maths
Tennis courts are real dimensions and game is 3D
Ball has position (x,y,z), speed(vx,vy,vz) and acceleration (ax,ay,az)
Game has 30 fps and on each update (1/30sec) it has these properties
vx +=ax;
...
2
votes
1answer
937 views
Finding Z given X & Y coordinates on terrain?
I need to know the most efficient way of finding Z given X & Y coordinates on terrain. My terrain is set up as a grid, each grid block consisting of two triangles which may be flipped in any ...
0
votes
1answer
462 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
2answers
137 views
Detecting if a point is inside a rectangle
I have a mouse cordinates in 2D game (x and y) and a rectangle (x,y, width,height).
How to find if the point is in the rectangle? I do not have any code to post here. I'm just searching for help.
1
vote
2answers
166 views
XNA Calculate two points of triangle with given Z
I want to calculate the two points of a 3D triangle that have a specified Z coordinate. I guess the way to do this would be to somehow create a plane which is perfectly flat with my given Z coordinate ...
1
vote
1answer
149 views
What does Rectangle.Intersect means/do?
Ok I have two rectangles
one is the ball and other is the paddle.
1. if(ball.rectangle.intersects(paddle.rectangle))
y = -Math.Abs(y);
and
2. if(paddle.rectangle.intersects(ball....
3
votes
1answer
387 views
Moller Tri Tri intersection
I'm done implementing Moller's tri-tri intersection routine. It gives you the location of where each triangle edge intersects the line of intersection between the 2 triangle planes:
Really you get ...
1
vote
1answer
420 views
Wrong intersection: Bounding Sphere and Ray
I've got a huge problem with BoundingSpheres and Rays in XNA and I really don't know how to solve it.
The problem:
foreach (BoundingSphere s1 in GetCollisionHullBoundingSpheres())
if (ray....
0
votes
1answer
890 views
How can I remove the view and projection matrix from ray position to get only the ray model?
I've got a little problem with my picking module and I need your help.
I have a method to project a ray from the camera to a fixed point when I click somewhere. The computed ray looks good, it go to ...