Hololens - stingray.Hololens namespace reference - Stingray Lua API Reference

stingray.Hololens namespace reference

Description

This object provides access to the Hololens interface.

Functions

Parameters

entity :

stingray.Entity

The entity to attach

world :

stingray.World

The world containing the entity

anchor_id :

integer

Id of the anchor to attach to

position :

stingray.Vector3?

Optional position offset relative to the anchor

The ? notation indicates that this type is optional: there may be zero or one instances of it.

rotation :

stingray.Quaternion?

Optional rotation offset relative to the anchor

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Returns

boolean

True if the entity was attached

The transform component will be updated to keep the entity from drifting in space.

Parameters

position :

stingray.Vector3

Position of anchor

rotation :

stingray.Quaternion?

Optional rotation of anchor

The ? notation indicates that this type is optional: there may be zero or one instances of it.
Returns

integer

Anchor Id

Returns a anchor_id used to track the anchor.

Use Hololens.destroy_anchor() to destroy the anchor when it's no longer in use.

Parameters

anchor_id :

integer

Id of the Spatial Anchor to destroy

Returns
This function does not return any values.
Parameters

entity :

stingray.Entity

The entity to detach

anchor_id :

integer

Id of the anchor to detach from

Returns
This function does not return any values.
Parameters
This function does not accept any parameters.
Returns

stingray.Matrix4x4

Head pose

Parameters

render_target :

string

The stereo render target name.

camera :

stingray.Camera

The camera used for stereo rendering.

world :

stingray.World

The world containing the camera.

Returns

boolean

Returns true if Hololens was initialized properly, otherwise returns false.

Parameters

interaction :

number

Interaction Type [Hololens.HAND, Hololens.CONTROLLER]

Returns

boolean

true if a press has been continued over from a previous frame, or false otherwise.

Parameters

interaction :

number

Interaction Type [Hololens.HAND, Hololens.CONTROLLER]

Returns

boolean

true if a press event has been detected since the last frame, or false otherwise.

Parameters

interaction :

number

Interaction Type [Hololens.HAND, Hololens.CONTROLLER]

Returns

boolean

true if a release event has been detected since the last frame, or false otherwise.

Parameters

point :

stingray.Vector3

The world-space coordinate to set the stabilization plane to.

Returns
This function does not return any values.
Parameters

entity :

stingray.Entity

Empty entity which will have mesh components for each surface detected by the Hololens

material :

string

Name of material

world :

stingray.World

World containing the entity

Returns
This function does not return any values.