-
1. Re: ray cast
James Newton, ACP Jul 4, 2013 6:48 AM (in response to tyree_2)In the 3D: Controlling action section of Adobe Director Basics, you can visit the section on Rays. On the Rays page, click on the right arrow to see four additional articles, including a short tutorial and a demo movie.
-
2. Re: ray cast
tyree_2 Jul 8, 2013 12:59 AM (in response to James Newton, ACP)that doesnt say how to access the models being hit by the ray. after the hit has taken place. only how to display them in the message window
-
3. Re: ray cast
James Newton, ACP Jul 8, 2013 7:11 AM (in response to tyree_2)Umm... I think that you will find that it says a lot more than how to display them in the message window.
I am, of course, assuming that you know how to download the demo movies so that you can study them. For example, you can execute the following line in the Message window:
go movie "http://www.adobe.com/support/director/examples/AirHockey.dir"
This will open the demo movie for you on the Stage in Director, and you will be able to study all the scripts. In particular, you will find this handler:
on GetImpactData(aMember, aPosition, aDirection, aBarrier)
vRayInfo = [:]
vRayInfo[#maxNumberOfModels] = 1
vRayInfo[#levelOfDetail] = #detailed
vRayInfo[#modelList] = [aBarrier]
vRayData = aMember.modelsUnderRay(aPosition, aDirection, vRayInfo)
vImpactData = vRayData.getLast() -- VOID if no barrier detected
return vImpactData
end GetImpactData
I am also assuming that you know how to experiment and explore, and extrapolate from the examples that you can find to create code that fits the custom specifications of your own project.


