PathInstruction
A PathInstruction is a table describing the specification for a camera path. It is used as an input to the openspace.pathnavigation.createPath
function.
There are two types of paths that can be created, as specified by the required TargetType parameter: ‘Node’ or ‘NavigationState’. The difference is what kind of target the path is created for, a scene graph node or a specific navigation state for the camera.
Depending on the type, the parameters that can be specified are a bit different. A ‘NavigationState’ already contains all details for the camera position, so no other details may be specified. For a ‘Node’ instruction, only a ‘Target’ node is required, but a ‘Height’ or ‘Position’ may also be specified. If both a position and height is specified, the height value will be ignored.
For ‘Node’ paths it is also possible to specify whether the target camera state at the end of the flight should take the up direction of the target node into account. Note that for this to give an effect on the path, rolling motions have to be enabled.
Members
Name |
Documentation |
Type |
Description |
Optional |
---|---|---|---|---|
|
|
In list { Node, NavigationState } |
No |
|
|
The desired duration traversing the specified path segment should take |
|
Value of type ‘Double’ |
Yes |
|
(Node): An optional height in relation to the target node, in meters |
|
Value of type ‘Double’ |
Yes |
|
(NavigationState): A navigation state that will be the target of the resulting path |
|
Yes |
|
|
The type of the created path. Affects the shape of the resulting path |
|
In list { AvoidCollision, ZoomOutOverview, Linear, AvoidCollisionWithLookAt } |
Yes |
|
(Node): An optional position in relation to the target node, in model coordinates (meters) |
|
Value of type ‘Vector3 |
Yes |
|
A navigation state that determines the start state for the camera path |
|
Yes |
|
|
(Node): The target node of the camera path. Not optional for ‘Node’ type instructions |
|
Value of type ‘String’ |
Yes |
|
(Node): If true, the up direction of the node is taken into account when computing the wayopoint for this instruction |
|
Value of type ‘Boolean’ |
Yes |