Browse Source

Merge pull request #293 from VaclavElias/master

docs: Physics jitter page styling improved
Vaclav Elias 1 year ago
parent
commit
a5e54f3af3
1 changed files with 18 additions and 15 deletions
  1. 18 15
      en/manual/physics/fix-physics-jitter.md

+ 18 - 15
en/manual/physics/fix-physics-jitter.md

@@ -8,7 +8,7 @@ In Stride, there is no default smoothing applied to entities that are attached t
 In this tutorial, we will explore how to add smoothing to an entity using a SyncScript.
 In this tutorial, we will explore how to add smoothing to an entity using a SyncScript.
 
 
 > [!Note]
 > [!Note]
-> You can also decrease the `Fixed Time Step` in the physics settings configuration to achieve more accurate physics simulations. For example, changing it from `0.016667` to `0.008` will increase accuracy but at the cost of higher CPU usage.
+> You can also decrease the `FixedTimeStep` in the physics settings configuration to achieve more accurate physics simulations. For example, changing it from `0.016667` to `0.008` will increase accuracy but at the cost of higher CPU usage.
 
 
 ## Code to handle smoothing between two entities
 ## Code to handle smoothing between two entities
 The following code is all that's needed to smoothly attach two entities. Ensure that you unparent the entity you are trying to smooth, otherwise the transform processor will override this script.
 The following code is all that's needed to smoothly attach two entities. Ensure that you unparent the entity you are trying to smooth, otherwise the transform processor will override this script.
@@ -42,7 +42,7 @@ public class SmoothFollowAndRotate : SyncScript
 
 
 ## Example Usage
 ## Example Usage
 
 
-This example demonstrates modifications to the **First Person Shooter** Template to integrate smooth camera movement.
+This example demonstrates modifications to the **First Person Shooter** template to integrate smooth camera movement.
 
 
 1. Detach the camera from the physics entity.
 1. Detach the camera from the physics entity.
 2. Remove the FPS camera script from the camera.
 2. Remove the FPS camera script from the camera.
@@ -84,29 +84,32 @@ var inverseView = Matrix.Invert(camera.ViewMatrix);
 ```
 ```
 
 
 to
 to
-`var inverseView = camera.Transform.WorldMatrix;`
+
+```cs
+var inverseView = camera.Transform.WorldMatrix;
+```
 
 
 ### FpsCamera.cs
 ### FpsCamera.cs
 
 
 Remove
 Remove
 
 
 ```cs
 ```cs
-        /// <summary>
-        /// Gets the camera component used to visualized the scene.
-        /// </summary>
-        private Entity Component;
+/// <summary>
+/// Gets the camera component used to visualized the scene.
+/// </summary>
+private Entity Component;
 ```
 ```
 and change
 and change
 
 
 ```cs
 ```cs
-        private void UpdateViewMatrix()
-        {
-            var camera = Component;
-            if (camera == null) return;
-            var rotation = Quaternion.RotationYawPitchRoll(Yaw, Pitch, 0);
-
-            Entity.Transform.Rotation = rotation;
-        }
+private void UpdateViewMatrix()
+{
+    var camera = Component;
+    if (camera == null) return;
+    var rotation = Quaternion.RotationYawPitchRoll(Yaw, Pitch0);
+
+    Entity.Transform.Rotation = rotation;
+}
 ```
 ```
 to
 to