ShootRay Rotation

Hello,

I am attempting to use the Rhino.ShootRay command in RhinoScript VB. I need the ray to do rotations in azimuth and elevation, but I cannot get it to rotate. I have tried to change the vector direction (shown below) but have failed miserably. Do any of you have any experience with rotating a ShootRay? If so, help would be much appreciated. My code is below:

Call ShootRayTest()
Sub ShootRayTest()
Dim strObject
strObject = Rhino.GetObject()
If Not Is Null (strObject) Then
Rhino.SelectObjects strObject
End If
Dim reflections, dir, arrPoint(2)
dir = Rhino.VectorRotate(Array(1,0,0),90.0,Array(0,0,1))
reflections = Rhino.ShootRay(strObject, Array(0,0,0),dir,1)
Rhino.AddPolyline reflections
Rhino.AddPoints reflections

Hello- it works but you need ‘IsNull’ and not ‘Is Null’ , & ‘SelectObject’, not ‘SelectObjects’ if you only have one object. If you use SelectObjects you need to put the one object in an array. In this test you do not need to have anything selected though, for it to work…

-Pascal

Oh, I didn’t realize that it gives a null statement if the Ray does not connect with an object. Sorry, about that, I figured it out. Thank you