RETransform
RETransform is the basic building block of all GameObjects, they always contain one.
Inherits from REComponent.
Methods
self:calculate_base_transform(joint)
Returns a Matrix4x4f. Returns the reference pose (T-pose) for a specific joint relative to the transform's origin (in local transform space).
self:set_position(position, no_dirty)
Sets the world position (Vector4f) of the transform.
When no_dirty is true, the transform and its parents will not be marked as dirty. This seems to be necessary when the scene is locked, because parent transforms will end up getting stuck.
self:set_rotation(rotation)
Sets the world rotation (Quaternion) of the transform.
self:get_position()
Gets the world position (Vector4f) of the transform.
self:get_rotation()
Gets the world rotation (Quaternion) of the transform.
self:calculate_tpose_pos_world(joint, depth)
Returns the world-space T-pose position for a joint at a given depth from the root. Returns Vector4f. depth defaults to 1.
self:apply_joints_tpose(joints_table, additional_parents)
Applies T-pose to a list of joints. Takes a Lua table of REJoint objects and an optional parent depth offset.
self:hook_update(fn)
Registers a Lua function to be called every frame for this specific transform. Useful for per-frame transform manipulation without a global update hook.