JSTraceTarget
API for managing objects created on a 3D map by moving them to a set path.
Create a API with Module.createTraceTarget.
let trace = Module.createTraceTarget("ID");Function
move(front, right, terrain)
Moves the object in the specified direction.
front
number
Forward and backward movement values (in meters).
right
number
Left and right movement values (in meters).
terrain
boolean
Set whether or not to refer to the terrain altitude of an object when moving. true: See real-time terrain elevation values. flase: fix object default altitude value.
// Omission of traceTarget creation and connection process.
traceTarget.move(1.0, 1.0, true);moveTarget(options)
Moves the object in the specified direction.
Unlike move(), it passes movement in 6 directions (forward/backward/left/right/up/down) as parameters.
var move_front = 0.0;
var move_back = 0.0;
var move_left = 0.0;
var move_right = 0.0;
var move_up = 0.0;
var move_down = 0.0;
if (GLOBAL["KEY_PRESS_w"]) {
    move_front = 1.0;
} else if (GLOBAL["KEY_PRESS_s"]) {
    move_back = 1.0;
} else;
if (GLOBAL["KEY_PRESS_a"]) {
    move_left = 1.0;
} else if (GLOBAL["KEY_PRESS_d"]) {
    move_right = 1.0;
} else;
if (GLOBAL["KEY_PRESS_q"]) {
    move_down = 1.0;
} else if (GLOBAL["KEY_PRESS_e"]) {
    move_up = 1.0;
} else;
GLOBAL.TRACE_TARGET.moveTarget({
    front: move_front,
    back: move_back,
    left: move_left,
    right: move_right,
    down: move_down,
    up: move_up,
});ReleaseObject() → boolean
Unregisters a registered object.
- Return - true: Disconnection successful. 
- false: Disconnection failed. 
 
// Omission of traceTarget creation and connection process.
traceTarget.ReleaseObject();set(options)
Create a movement path function using object and movement information.
The object supports only JSGhostSymbol and JSPoint.
unionTargetToTerrain()
The object moves by referencing the terrain altitude during movement.
// Omission of traceTarget creation and connection process.
traceTarget.unionTargetToTerrain();Getter / Setter
getObject(), setObject(object) → JSObject
Changes the currently connected target object.
The object supports only JSGhostSymbol and JSPoint.
Does not operate if the object is null.
// Omission of traceTarget creation and connection process.
traceTarget.getObject();
// ... or ...
// Omission of traceTarget creation and connection process.
traceTarget.setObject(object);Type Definitions
JSTraceTarget.moveParameter
front
number
optional
0.0
Forward movement values (in meters).
back
number
optional
0.0
backward movement values (in meters).
left
number
optional
0.0
leftward movement values (in meters).
right
number
optional
0.0
rightward movement values (in meters).
up
number
optional
0.0
upward movement values (in meters).
down
number
optional
0.0
downward movement values (in meters).
Last updated
