Skip to content

Commit 1ef8bc2

Browse files
committed
Fix Kinematic Spinner bar speed.
1 parent 1e5bcf5 commit 1ef8bc2

File tree

1 file changed

+2
-2
lines changed
  • LowLevel/Sandbox/Assets/Scenes/Benchmark/Spinner

1 file changed

+2
-2
lines changed

LowLevel/Sandbox/Assets/Scenes/Benchmark/Spinner/Spinner.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private void SetupOptions()
7676
m_MotorSpeed = evt.newValue;
7777

7878
if (m_KinematicSpinner)
79-
m_SpinnerBody.angularVelocity = m_MotorSpeed;
79+
m_SpinnerBody.angularVelocity = PhysicsMath.ToDegrees(m_MotorSpeed);
8080
else
8181
m_SpinnerHinge.motorSpeed = m_MotorSpeed;
8282
});
@@ -179,7 +179,7 @@ private void SetupScene()
179179
var bodyDef = new PhysicsBodyDefinition
180180
{
181181
bodyType = m_KinematicSpinner ? RigidbodyType2D.Kinematic : RigidbodyType2D.Dynamic,
182-
angularVelocity = m_KinematicSpinner ? m_MotorSpeed : 0f,
182+
angularVelocity = m_KinematicSpinner ? PhysicsMath.ToDegrees(m_MotorSpeed) : 0f,
183183
position = new Vector2(0f, -20f),
184184
sleepingAllowed = false
185185
};

0 commit comments

Comments
 (0)