by taniwha » Sun Dec 23, 2012 4:14 am
Traceline is instant: it has to be because it's used (internally, but indirectly*) for collision detection of moving objects.
The way traceline is used is to do a trace for the distance the object will move in one frame. There is no speed limit in quake's physics**, so if you want to have a non-instant but very fast bullet, just set the bullet's speed to something appropriate and let the physics engine take care of everything (cloning the nail code is a good start).
The reason traceline is used for collision detection is to avoid the issue of a fast moving object missing just because its per-frame position never hits the target. Unfortunately, quake does not do it both ways, so two fast moving objects will miss even when they shouldn't, but for one fast and one slow (or both slow), it will work.
* Actually, traceline isn't used, but rather the code for which traceline is a wrapper is used, so it's effectively the same thing.
** Mostly. There is one, but it's caused by the precision of floats so it's pretty high.