From ed01f2f90653f5d44254d9feb679bdbbad737985 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Thu, 9 May 2024 01:43:00 -0400 Subject: [PATCH] This probably doesn't need to be a thing --- source/animation_station/init.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/animation_station/init.ts b/source/animation_station/init.ts index 96207b09..6e81aaf9 100644 --- a/source/animation_station/init.ts +++ b/source/animation_station/init.ts @@ -5,6 +5,7 @@ namespace animationStation { const create3d = vector.create3d; const loadFiles = utility.loadFiles; const fakeRef = utility.fakeRef; + const tickRate = utility.tickRate; loadFiles(["master_containers"]); @@ -91,6 +92,22 @@ namespace animationStation { return true; } + /** + * Set a player's bone rotation. + * @param player The player. + * @param boneName The bone. + * @param rotation The rotation (in radians). + */ + export function setPlayerBoneRotation(player: ObjectRef, boneName: string, rotation: Vec3): void { + player.set_bone_override(boneName, { + rotation: { + vec: rotation, + interpolation: tickRate, + absolute: false + } + }); + } + /** * Set a bone animation which synchronizes with the current progress of another bone. * @param player The player.