|
Author Topic:   Tread Marks - Instant shots into hmap?
JohnMancine
Member
posted October 29, 1999 11:38 AM            
Seumas,

I recently posted a question on Algorithms about finding out where/if a ray casted into a heightmap intersects with the heightmap.

In Tread Marks you are doing this with the laser / instant bullet guns. Can I ask how you go about it? Do you use a line drawing algo and trace the bullet? I'm a little uncertain about how to do this in 3D though... 2D was fairly easy, just using Bres. lines... but can that be done in 3D also?

Thanks!
John

p.s. - sorry if this is easy stuff... but i'm pretty bad at line intersection algos.

IP:

LDA Seumas
unregistered
posted October 29, 1999 07:51 PM           
I just step along the bullet's trajectory, in fairly large steps actually, and test for the 3D point being inside the terrain at each step. It's not as accurate as it could be if I took smaller steps, but it's fast and good enough in most situations.

------------------
-- Seumas McNally, Lead Programmer, Longbow Digital Arts

IP: