User Guide
ADOBE ATMOSPHERE 311
User Guide
// Calculates the distance to the object
// clicked on by the mouse
distance = theStage.rayIntersectionDistance(rayOrigin, rayDir);
rayIntersectionNormal(Vector rayOrigin, Vector rayDirection)
Given an origin and direction shoots a ray and returns the normal vector of the surface the ray intersects.
camera = application.getView(0).getCamera(0);
mouseX = application.getView(0).mouseX;
mouseY = application.getView(0).mouseY
rayOrigin = player.position;
rayDir = camera.getRayDirectionFromPixelCoords(mouseX, mouseY);
// Calculates the normal vector of the surface
// clicked on by the mouse
normal = theStage.rayIntersectionNormal(rayOrigin, rayDir);
rayIntersectionUTangent(Vector rayOrigin, Vector rayDirection)
Given an origin and direction shoots a ray and returns the side vector of the surface the ray intersects.
camera = application.getView(0).getCamera(0);
mouseX = application.getView(0).mouseX;
mouseY = application.getView(0).mouseY
rayOrigin = player.position;
rayDir = camera.getRayDirectionFromPixelCoords(mouseX, mouseY);
// Calculates the side vector of the surface
// clicked on by the mouse
sideVector = theStage.rayIntersectionUTangent(rayOrigin, rayDir);
rayIntersectionVTangent(Vector rayOrigin, Vector rayDirection)
Given an origin and direction shoots a ray and returns the up vector of the surface the ray intersects.
camera = application.getView(0).getCamera(0);
mouseX = application.getView(0).mouseX;
mouseY = application.getView(0).mouseY
rayOrigin = player.position;
rayDir = camera.getRayDirectionFromPixelCoords(mouseX, mouseY);
// Calculates the up vector of the surface
// clicked on by the mouse
upVector = theStage.rayIntersectionVTangent(rayOrigin, rayDir);










