ManipulateFrameIntersectResult
Lens Studio v1.0.0+
Description
Result object returned from ManipulateComponent.intersectManipulateFrame().
Methods
getIntersectionPoint()
: vec3
If there was a valid intersection, returns the intersection point in world space.
isValid()
: Boolean
Returns whether there was a valid intersection.
Examples
// Returns an intersectManipulateFrame based on user touch position
//@input Component.ManipulateComponent manip
function onTap(eventData)
{
var touchPos = eventData.getTouchPosition();
var intersectManipFrame = script.manip.intersectManipulateFrame(touchPos);
if(intersectManipFrame && intersectManipFrame.isValid())
{
screenPoint = intersectManipFrame.getIntersectionPoint();
print(screenPoint.toString());
}
}
var tapEvent = script.createEvent("TapEvent");
tapEvent.bind(onTap);
Still Looking for help?
Visit Support