Tag Info

New answers tagged

1

I assume your world is represented as a grid, the algorithm you need to do line grid intersection is called Digital differential analyzer algorithm. The code too much to write quickly, you can find a full explanation here. This algorithm/technique is used to solve different problems that need interpolating a variable over an interval. It's similar to ...


3

To find the normal, you can use the cross product of three of the points in the polygon. Create two vectors from those three points and find the cross product of those. To find the intersection of the ray with the polygon, you will first need to ensure it intersects with the plane of the polygon. To do this, you will need to do some algebraic manipulation ...



Top 50 recent answers are included