ManipulateFrameIntersectResult
ClassResult object returned from ManipulateComponent.intersectManipulateFrame.
- Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.
Index
Example
// 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);
Methods
getIntersectionPoint()
getIntersectionPoint():
vec3
If there was a valid intersection, returns the intersection point in world space.
Returns
getTypeName()
staticgetTypeName():TypeName<ManipulateFrameIntersectResult>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<ManipulateFrameIntersectResult>
isValid()
isValid():
boolean
Returns whether there was a valid intersection.
Returns
boolean