From dc927b367d2b503d7b01a7c275dcfe87e3cb95c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Hodossy?= Date: Wed, 23 Nov 2022 16:26:42 +0000 Subject: [PATCH] Remove unnecessary unit conversion --- unity/Runtime/Components/Joints/MjSlideJoint.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unity/Runtime/Components/Joints/MjSlideJoint.cs b/unity/Runtime/Components/Joints/MjSlideJoint.cs index 2b5da313..fa63c6b2 100644 --- a/unity/Runtime/Components/Joints/MjSlideJoint.cs +++ b/unity/Runtime/Components/Joints/MjSlideJoint.cs @@ -43,8 +43,7 @@ namespace Mujoco { } public override unsafe void OnSyncState(MujocoLib.mjData_* data) { - var qpos = (float)data->qpos[QposAddress]; - Configuration = (qpos % (2 * Mathf.PI)) * Mathf.Rad2Deg; + Configuration = (float)data->qpos[QposAddress]; Velocity = (float)data->qvel[DofAddress]; }