Author: {wf}shadowspawn <shadowspawn_at_shadowspawn_dot_net>     Reply to Message
Date: 11/22/2003 12:17:40 AM
Subject: RE: also that annoying 'thump' when missing fl

triggers are created by bounding box extents. (look at how door triggers are spawned in q2/q3 modsource). entities are handled the same way. that means its a bounding box with it's extents. means a 45 degree beam becomes a big damn box with extent/absmin/absmax checks.

think about what you are asking, and what a bounding box is, assuming that i'd make it square, well for the laser i'm making it an octagon. you'd have to do traces between extent points along the shooting axis, then create a contents within those constraints. that's a crapload of computation to do once every frame; it does that for drawing but it doesn't actually do anything but draw stuff.

thats tough to do, considering that there is no code to do that except in the renderer itself :P.

BUT you can create extent traces and fake it. using the same box trace code that's in the actual exe, the engine, you can create absoulte mins and max's based on those "laser" traces and sorta, well, to be honest 'wing' it.

the math is the same, if the bbox hits within the extents (one of however many traces i make) it'll count as a touch.

its just not really a contents flag. the problem is that a laser's damage trace is actually 1 unit, and the beam is drawn with a radius of 4, making it 8 units. that means with this new method the area is 8x as large... in theory. no biggie, but i know people are gonna say that the laser is more powerful when it's actually not.

it'll just have a less chance of missing, it'll be checked with prediction similar to the anti-lag code (you'll get damage when you thought u made it through it unscathed), and it's both client and engine side, thats all.

so no, you can't just make a trigger and rotate it and create contents. you can 'draw' something, but the math starts going nuts when it comes to collision detection. just check out the target_laser with q3 and you'll get an idea what's goin on.

  


_