From 339b8733154f3d4176f6541077143c0712a07f0a Mon Sep 17 00:00:00 2001 From: A-Harada <37181352+Autumn60@users.noreply.github.com> Date: Fri, 27 Oct 2023 00:53:11 +0900 Subject: [PATCH] Fix func name (#63) --- Assets/UnitySensors/Runtime/Scripts/Sensors/IMU/IMUSensor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/UnitySensors/Runtime/Scripts/Sensors/IMU/IMUSensor.cs b/Assets/UnitySensors/Runtime/Scripts/Sensors/IMU/IMUSensor.cs index 0755710d..313357d8 100644 --- a/Assets/UnitySensors/Runtime/Scripts/Sensors/IMU/IMUSensor.cs +++ b/Assets/UnitySensors/Runtime/Scripts/Sensors/IMU/IMUSensor.cs @@ -52,7 +52,7 @@ protected override void UpdateSensor() _velocity = (_position - _position_last) / _dt; _acceleration = (_velocity - _velocity_last) / _dt; - _acceleration += _transform.InverseTransformVector(_gravity).normalized * _gravityMagnitude; + _acceleration += _transform.InverseTransformDirection(_gravity).normalized * _gravityMagnitude; Quaternion rotation_delta = Quaternion.Inverse(_rotation_last) * _rotation; rotation_delta.ToAngleAxis(out float angle, out Vector3 axis);