We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cff4ad4 commit 060a9efCopy full SHA for 060a9ef
unity-environment/Assets/ML-Agents/Examples/Bouncer/Scripts/BouncerAgent.cs
@@ -98,8 +98,15 @@ private void FixedUpdate()
98
Done();
99
}
100
101
- bodyObject.transform.rotation = Quaternion.Lerp(bodyObject.transform.rotation, Quaternion.LookRotation(lookDir),
102
- Time.fixedDeltaTime * 10f);
+ }
103
+ private void Update()
104
+ {
105
+ if (lookDir.magnitude > float.Epsilon)
106
107
+ bodyObject.transform.rotation = Quaternion.Lerp(bodyObject.transform.rotation,
108
+ Quaternion.LookRotation(lookDir),
109
+ Time.deltaTime * 10f);
110
111
112
0 commit comments