Transform Points
Read named attachment frames for models, propellers, cameras, lights or effects.
Verified against the project sources on 19 September 2026.
Syntax#
jolt_asset_get_point(asset, point_ref);
jolt_asset_get_point_transform(asset, point_ref, [body]);
jolt_asset_create_point(asset, point_ref, body);Factories return undefined on failure; inspect jolt_get_error() immediately. Authoring lookups return independent validated record copies. A reference is a canonical UUID or an exact, case-sensitive Key. Body owners must be live managed bodies in the current world.
World frame = current Body origin transform × authored local transform. The center of mass is not the authoring origin. Positions use metres and rotations use normalized XYZW quaternions. Refresh snapshots as the body moves.
Transform Point is a neutral spatial marker. JSON v2 points[] contains id, key, optional name, position and rotation, with no scale, radius, force or gameplay type. Blender displays a fixed 0.24 m pink cube and 0.30 m RGB axes; runtime +X/+Y/+Z matches Blender −X/+Y/+Z. Use G/R; scale is locked.
Result shapes#
| API / field | Contract |
|---|---|
| jolt_asset_get_point | Plain record; position[3], rotation[4] arrays. |
| jolt_asset_get_point_transform | {position:{x,y,z}, rotation:{x,y,z,w}}. Local without body; current world frame with body. |
| point.get_transform() / point.get_local_transform() | Current world frame / copied local frame. |
| point.get_position() / point.get_rotation() | World {x,y,z} / {x,y,z,w}. |
| point.get_x() / point.get_y() / point.get_z() | World position components. |
| point.is_valid() / point.destroy() | Check owner and helper / remove debug registration. |
Example#
// Create: the asset contains Key "propeller_left".
propeller_point = jolt_asset_create_point(asset, "propeller_left", body_vehicle);
// Step or Draw: request a fresh world transform.
if (!is_undefined(propeller_point) && propeller_point.is_valid()) {
var frame = propeller_point.get_transform();
var model_matrix = model_matrix_from_transform(frame);
// Pass model_matrix to your rendering system.
}
jolt_debug_enable(true);
jolt_debug_set(JOLT_DEBUG_POINTS, true);Configured points store a snapshot of the asset and follow their current static/kinematic/dynamic owner. They allocate no native resource and apply no physics. Call destroy() when finished; owner destruction or jolt_stop() invalidates them automatically. Invalid getters return undefined. Bare lookup/transform calls do not register a debug marker.
Verified operation contracts#
These contracts distinguish units, return values, errors and lifetime according to the current implementation. Check results: false, 0 and undefined can mean different things for different methods.
| Symbol / owner | Signature | Operation contract |
|---|---|---|
| AssetPoint.destroy | AssetPoint.destroy() | Boolean helper/owner validity; destroy true and invalidates only helper, not owner. |
| AssetPoint.get_local_transform | AssetPoint.get_local_transform() | Current transform {position m, rotation XYZW}, its world position/rotation/component according to name. Only get_local_transform is owner-relative. All undefined on error; results are not BBMOD instances exposing get_transform(). |
| AssetPoint.get_position | AssetPoint.get_position() | Current transform {position m, rotation XYZW}, its world position/rotation/component according to name. Only get_local_transform is owner-relative. All undefined on error; results are not BBMOD instances exposing get_transform(). |
| AssetPoint.get_rotation | AssetPoint.get_rotation() | Current transform {position m, rotation XYZW}, its world position/rotation/component according to name. Only get_local_transform is owner-relative. All undefined on error; results are not BBMOD instances exposing get_transform(). |
| AssetPoint.get_transform | AssetPoint.get_transform() | Current transform {position m, rotation XYZW}, its world position/rotation/component according to name. Only get_local_transform is owner-relative. All undefined on error; results are not BBMOD instances exposing get_transform(). |
| AssetPoint.get_x | AssetPoint.get_x() | Current transform {position m, rotation XYZW}, its world position/rotation/component according to name. Only get_local_transform is owner-relative. All undefined on error; results are not BBMOD instances exposing get_transform(). |
| AssetPoint.get_y | AssetPoint.get_y() | Current transform {position m, rotation XYZW}, its world position/rotation/component according to name. Only get_local_transform is owner-relative. All undefined on error; results are not BBMOD instances exposing get_transform(). |
| AssetPoint.get_z | AssetPoint.get_z() | Current transform {position m, rotation XYZW}, its world position/rotation/component according to name. Only get_local_transform is owner-relative. All undefined on error; results are not BBMOD instances exposing get_transform(). |
| AssetPoint.is_valid | AssetPoint.is_valid() | Boolean helper/owner validity; destroy true and invalidates only helper, not owner. |
| jolt_asset_create_point | jolt_asset_create_point(asset,point_ref,body) | Returns AssetPoint/undefined, retains an independent authoring record and follows a live owner; creates no physics. |
| jolt_asset_get_point | jolt_asset_get_point(asset,point_ref) | Asset + exact key or canonical UUID. Revalidates the mutable asset and returns an independent data record, not a physics object; failure undefined and managed error. |
| jolt_asset_get_point_transform | jolt_asset_get_point_transform(asset,point_ref,body=undefined) | Without body returns local point transform, with live body world {position m, rotation XYZW}; undefined on error. |