Advertisement

3d Line of sight

Started by May 02, 2001 08:57 AM
0 comments, last by kingy 23 years, 9 months ago
Im having some problems with how to go about 3d line of sight. 2d line of sight is easy, you can use bresenham line with sine and cosine to form a line of sight arc... but how do i go about applying this to 3 dimensions?
“If you try and please everyone, you won’t please anyone.”
Since noone has replied, I better share my thoughts at least...

Am I right that you are talking about 3D Line of Sight in 2D plane? or Are you on about 3D LoS in 3D? 2D one *can* be done without vector maths, so the two are pretty different. If 2D plane, is that flat 2D or isometric?

I don''t know about that "sin & cos arc" version of LoS. Sorry It sounds odd to me. Line of Sight is a "Line" precisely because it''s a straight line, whether it be a flat 2D plane or isometric plane (Or are you taking the earth''s curveture into consideration???). At least thats how I was brought up. I believe you use some different method. I think this is just an ignorance on my part.
When I use Bresenham for LoS, I start from starting (x,y) to the centre of the target''s (x,y). And check the pixels it passes through and see if it comes in contact with Obstruction cells.

I could give theoretical explanation on 3D LoS on 2D, but if you are on about something entirely different, then it''d be waste of time... so whether or not I can reply, I better wait till you reply

This topic is closed to new replies.

Advertisement