natiny.entity.move
natiny.entity.move(node, space, dx, dy, dz)
Moves a node by a delta offset in the given coordinate space.
Parameters
| Name | Type | Description |
|---|---|---|
node |
number |
Entity handle (e.g. model, body, sound source or camera) |
space |
integer |
natiny.entity.SPACE_LOCAL or natiny.entity.SPACE_WORLD |
dx |
number |
Offset along X axis |
dy |
number |
Offset along Y axis |
dz |
number |
Offset along Z axis |
Example
natiny.entity.move(node, natiny.entity.SPACE_LOCAL, 0.0, 0.0, -1.0)
Notes
SPACE_LOCALrotates the delta by the node's local orientation before adding it.SPACE_WORLDinterprets the delta along world axes.- World-space conversion assumes a parent with unit scale. With a scaled parent, the resulting world displacement is not exact.