Native Components
animation
Examples: Animation Example
Animation playback.
Param | Type | Description |
---|---|---|
preview | Bool | Enable to preview the animation in editor |
retarget | Bool | Retarget all tracks to this object |
animation | Animation | Animation to play |
autoplay | Bool | Start playing automatically |
playCount | Int | Number of repetitions or 0 for infinite loop |
Track Targets
Each track in an imported animation has a target. The target is the object that is affected by the track.
Retargetting is the process of changing a track’s target to a different object.
Animation track targets are initially specified by the imported file, but
often are reused for other objects. This can be done by enabling retarget
on the component, which will interally duplicate the animation, but with
the target of all tracks set to the component’s object.
collision
Examples: Collision Example
Used for ray casting and overlap queries.
Param | Type | Description |
---|---|---|
collider | Enum | Collision shape: Axis-Aligned Box, Box or Sphere |
radius | Float | For spheres: the sphere radius |
extents | Vec3 | For box/aabb: the box half-extents |
groups | Bool[]/Int | Array of groups of which the object should be part of |
input
Set the object’s transformation to WebXR Device API input. This can be a VR controller or VR/AR headset.
When no input is present (e.g. no controller on the users system or controller not trackable), the component will set the position of the object to the last known input. If no input was known, the transformation is set to the identity (location at origin, no rotation). Set the component inactive to avoid the transformation to be set.
Param | Type | Description |
---|---|---|
type | Enum | Input type |
light
Light source.
Param | Type | Description |
---|---|---|
type | Enum | Point (punctual) or Sun (directional) |
color | Color | Light color |
attenuation | Float | Light attenuation |
mesh
Examples: Skinning Example
Renders a mesh with given material and an optional skin.
Param | Type | Description |
---|---|---|
mesh | Mesh | Mesh to render |
skin | Skin | Skin to render. Appears if mesh has skin properties (joint ids and weights). |
material | Material | Material to render with. |
text
Examples: Text Example
Renders a string with the project-wide font and a material.
The material should use the DistanceFieldVector Textured
shader and DefaultFont
texture,
otherwise rendered results might be unexpected.
Param | Type | Description |
---|---|---|
alignment | Enum | Horizontal text alignment |
justification | Enum | Vertical text justification |
text | String | Text to be displayed |
material | Material | Material to render with, should use the DistanceFieldVector Textured shader. |
view
A virtual camera.
To set left/right eye views for VR, set corresponding objects in “Project Settings” > “VR”.
Param | Type | Description |
---|---|---|
fov | Float | Vertical field of view |
near | Float | Distance to the near clipping plane (closest render distance) |
far | Float | Distance to the far clipping plane (farthest render distance) |