From 5c74250b739f68c2a1d53052f43e37f2802bc60e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Lu=C3=ADs=20Vaz=20Silva?= Date: Thu, 22 May 2025 21:04:21 -0300 Subject: [PATCH] return rotation with GetBonePosition --- wadsrc/static/zscript/actors/actor.zs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wadsrc/static/zscript/actors/actor.zs b/wadsrc/static/zscript/actors/actor.zs index aae41c81b..2d82a4d38 100644 --- a/wadsrc/static/zscript/actors/actor.zs +++ b/wadsrc/static/zscript/actors/actor.zs @@ -1475,21 +1475,23 @@ class Actor : Thinker native // //================================================ - /* rotation, translation, scaling */ + /* rotation, translation, scaling, doesn't include parent bones */ native version("4.15.1") Quat, Vector3, Vector3 GetBone(int boneIndex, bool include_offsets = true); native version("4.15.1") Quat, Vector3, Vector3 GetNamedBone(Name boneName, bool include_offsets = true); native version("4.15.1") Vector3, Vector3 TransformByBone(int boneIndex, Vector3 position, Vector3 direction = (0,0,0), bool include_offsets = true); native version("4.15.1") Vector3, Vector3 TransformByNamedBone(Name boneName, Vector3 position, Vector3 direction = (0,0,0), bool include_offsets = true); - version("4.15.1") Vector3 GetBonePosition(int boneIndex, bool include_offsets = true) + version("4.15.1") Vector3, Vector3 GetBonePosition(int boneIndex, bool include_offsets = true) { - return TransformByBone(boneIndex, GetBoneBasePosition(boneIndex), include_offsets:include_offsets); + let [a, b] = TransformByBone(boneIndex, GetBoneBasePosition(boneIndex), include_offsets:include_offsets); + return a, b; } - version("4.15.1") Vector3 GetNamedBonePosition(name boneName, bool include_offsets = true) + version("4.15.1") Vector3, Vector3 GetNamedBonePosition(name boneName, bool include_offsets = true) { - return GetBonePosition(GetBoneIndex(boneName), include_offsets); + let [a, b] = GetBonePosition(GetBoneIndex(boneName), include_offsets); + return a, b; } //================================================