LocatedAtComponent
ClassEnables placing a SceneObject at a real world location provided by LocationAsset and specified relative position.
- Available on all platforms
Index
Properties
Methods
Extends
Properties
distanceToLocation
readonlydistanceToLocation:number
Since
Lens Scripting Version 197
enabled
enabled:
boolean
If disabled, the Component will stop enacting its behavior.
Default Value
true
Inherited from
isBeingDestroyed
readonlyisBeingDestroyed:boolean
Returns true if this Component is currently being destroyed. Becomes true as soon as
destruction begins via Component#destroy or destruction of its owning SceneObject,
before any OnDestroyEvent callbacks fire.
Since
Lens Scripting Version 364
Example
if (!script.isBeingDestroyed) {
// Component is still fully alive
}
Inherited from
isEnabledInHierarchy
readonlyisEnabledInHierarchy:boolean
Returns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.
Inherited from
Component.isEnabledInHierarchy
location
location:
LocationAsset
The LocationAsset which contains the position this object should be anchored to.
Since
Lens Scripting Version 172
Default Value
null
onCannotTrack
readonlyonCannotTrack:event0<void>
Since
Lens Scripting Version 197
onCanTrack
readonlyonCanTrack:event0<void>
Since
Lens Scripting Version 197
onError
readonlyonError:event0<void>
Since
Lens Scripting Version 197
onFound
readonlyonFound:event0<void>
Since
Lens Scripting Version 197
onLost
readonlyonLost:event0<void>
Since
Lens Scripting Version 197
onReady
readonlyonReady:event0<void>
Since
Lens Scripting Version 197
position
position:
vec3
The geo anchored position within a LocationAsset that this object should be anchored to.
Since
Lens Scripting Version 172
Default Value
(0, 0, 0)
proximityStatus
readonlyproximityStatus:LocationProximityStatus
sceneObject
readonlysceneObject:SceneObject
The SceneObject this component is on.
Inherited from
uniqueIdentifier
readonlyuniqueIdentifier:string
Since
Lens Scripting Version 176
Inherited from
Methods
createMappingOptions()
staticcreateMappingOptions():MappingOptions
Creates an option object for the LocatedAtComponent.
Returns
Since
Lens Scripting Version 229
createMappingSession()
staticcreateMappingSession(options):MappingSession
Creates a mapping session.
Parameters
| Parameter | Type |
|---|---|
options | MappingOptions |
Returns
Since
Lens Scripting Version 229
destroy()
destroy():
void
Destroys the component.
Returns
void
Inherited from
getSceneObject()
getSceneObject():
SceneObject
Returns the SceneObject the component is attached to.
Returns
Inherited from
getTransform()
getTransform():
Transform
Returns the Transform this component is attached to.
Returns
Inherited from
getTypeName()
staticgetTypeName():TypeName<LocatedAtComponent>
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<LocatedAtComponent>
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean