RailResource
ThorResourceType
:0x1F
- Max. version:
0x1
A RailResource
describes a rail along which a hotspot can be dragged.
RailResource
structure
Name | Type | Description |
---|---|---|
header | ThorResourceHeader |
|
hotspotName | EncryptedString |
Name of the GeometryResource which describes the draggable hotspot for this rail. |
initialVertex | uint16 |
|
directionType | DirectionType |
|
sensitivity | float32 |
|
snapFactor | float32 |
|
maxAngle | float32 |
|
isCyclic | bool |
Indicates whether the first and last rail segments connect back to each other, i.e. whether the rail's hotspot can be dragged past the last rail segment to the first (and/or vice versa). |
orientationX | float32 |
|
orientationZ | float32 |
|
vertices | Array <RailVertex > |
If !isCyclic , vertices[0].in and vertices[vertices.len-1].out are ignored. |
DirectionType
enum
DirectionType
describes the direction in which a hotspot can be dragged along a rail.
Name | Value |
---|---|
Forward |
0x0 |
Backward |
0x1 |
Bidirectional |
0x2 |
RailVertex
structure
A RailVertex
describes a vertex along a cubic Bézier curve.
Name | Type | Description |
---|---|---|
pos | Vector3 |
Position. |
in | Vector3 |
|
out | Vector3 |