|
![](/i/fill.gif) |
> Hmm, that DOES work...and always hits the correct two-line intersection. Nicely
> done! To re-word my own phrase, and using your idea, "...trace's 'direction'
> vector CAN dynamically change to always point at a particular location in
> space." The general idea, although probably not the right words.
The direction vector that trace needs is purely a direction, like a
heading in geography (eg north-east or 45 degrees) - it doesn't contain
any information about location in the scene. Trace will then start at
the "start position" you specify and fire a ray in the direction you
specify.
If you want the ray to pass through a certain point then you can
calculate the direction like I did, by taking the difference between the
point you want it to pass through and the start point.
> In looking at your code, it occurred to me that I've actually used this very
> thing in the past; don't know how I could have forgotten it so easily. Maybe
> because useful code snippets/ideas can get 'lost' when not used on a regular
> basis. My excuse, anyway... :-/
Perfectly valid excuse :-) Most of my scenes involve plenty of
copying&pasting from previous scenes, it's much faster than trying to
look up how to use certain features again (this is where an IDE like the
one Mike Raiford was developing would be really helpful).
> BTW, looking back at our posts here shows me that I misunderstood one of your
> suggestions...
>
>> Define a cylinder between points A and B with a small radius.
>> Use the trace command to trace from point C in direction (D-C) ... etc.
>
> I mistook that for a shorthand way of simply saying "D *TO* C" rather than "D
> MINUS C".
OK yes that would get things backwards - sorry for the confusion!
Nothing beats posting actual code :-)
Post a reply to this message
|
![](/i/fill.gif) |