RobotSquirrel
Arcane
It is a thing"hitscan but it bends and checks entity positions at a delayed time of collision" isn't a thing.
You just have a second ray fly along like a projectile, if it detects anything tell the bullet to recalculate its path. Player is none the wiser.
The bullet is hitscan up until it detects a change, then it stops for a milisecond has a think about it and then returns to being a hitscan.
The traditional term for a hitscan in the doom days is what you're talking about which is why you're confused. Those were single use and never updated. Now we can repeatedly use them and update them dynamically. Effectively what I'm talking about could be considered a hybrid approach and last time I checked there wasn't a definition for that, which is why we just got used to calling it hitscan, as they are obviously not projectiles.
The tell is going to be, can the bullet move beyond a certain length, raycasts have to have a set length otherwise the bullet will just pass through. When we detect that the bullet is likely to hit we know the bullet has hit because it has reached the end of the path. If it didn't hit we refer to the other ray to figure out why it didn't. The system can fail it's not perfect but it is better than the usual projectile method. (example of it failing, hitting a very fast-moving small object that moved into the path of the bullet, the bullet was unable to detect it so just pass through)
It goes the opposite way as well, that the bullet doesn't correct the hit the player has moved out the way the hit is still awarded because the path never recalculated. (The bullet is still detecting a hit but the object has moved out of the way slightly because the entire system is built on the assumption of a hit).
If both the initial hitscan and the traveling ray both return a hit then we know with confidence it did hit. Its those inbetweens where the system fails so its not perfect at all but its still able to track high velocity which is why we do it like this.
the second ray works similar to ray marching it doesn't have to update in realtime but should do so an an interval that makes sense and is performant, the point is that its point of origin is where the bullet presently sits on the first path. If the bullets travel is short we just revert to a traditional hitscan, if its long then this system would be necessary.
Last edited: