3 ms·
Rays are just a geometric primitive defined by a starting point and a direction. So a single raycast based weapon can conceptually fire infinitely far in a sing
by meheleventyone 7y ago
Rays are just a geometric primitive defined by a starting point and a direction. So a single raycast based weapon can conceptually fire infinitely far in a single test, so much faster than the speed of light. Collision tests are just the result of calculating the point of intersection between it and other primitives.
Games run in discreet time steps called frames or ticks. Bullets travel can then be simulated in several ways for example using numerical integration to apply forces to each bullet for the time step to calculate its new position, collision testing the line segment (“raycasting”) between the position of the last frame and the new position and calculating and displaying the results.