|
![](/i/fill.gif) |
On Thu, 10 Feb 2000 17:44:38 -0800, H.E. Day wrote:
>the normal and position if the ray collides with a declared object *and
>doesn't collide with any declared other objects*.
>I mean like this.
>
>trace2(object,testobject,start,vector,normal)
>
>Where "object" is the object you're shooting at, and "testobject" is the
>
>object you want to test. This method would only test the "testobject"
>BEFORE the ray hits the "object".
>Can these be done???
#macro trace2(Object, TestObject, Start, Vector, Normal )
#local TestNorm = <0,0,0>;
#local ONorm = <0,0,0>;
#local TestInt = trace(TestObject, Start, Vector, TestNorm);
#local Int = trace(Object,Start,Vector,ONorm);
#if (vlength(TestNorm)>.1 & vlength(ONorm)>.1)
#if (vlength(TestInt-Start)>vlength(Int-Start))
#declare Normal=ONorm;
Int
#else
#declare Normal=<0,0,0>;
<0,0,0>
#end
#else
#declare Normal=ONorm;
Int
#end
#end
Post a reply to this message
|
![](/i/fill.gif) |