diff --git a/Experimental/DistributedAuthoritySample/Assets/ScriptableObjects/AvatarPhysicsPlayerControllerSettings.asset b/Experimental/DistributedAuthoritySample/Assets/ScriptableObjects/AvatarPhysicsPlayerControllerSettings.asset index fb00037c..5d56a07e 100644 --- a/Experimental/DistributedAuthoritySample/Assets/ScriptableObjects/AvatarPhysicsPlayerControllerSettings.asset +++ b/Experimental/DistributedAuthoritySample/Assets/ScriptableObjects/AvatarPhysicsPlayerControllerSettings.asset @@ -12,8 +12,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 48976c2ba473849eab61b8e1398b8644, type: 3} m_Name: AvatarPhysicsPlayerControllerSettings m_EditorClassIdentifier: - WalkSpeed: 6 - SprintSpeed: 10 + WalkSpeed: 18 + SprintSpeed: 30 Acceleration: 50 DragCoefficient: 4 AirControlFactor: 0.5 diff --git a/Experimental/DistributedAuthoritySample/Assets/Scripts/Physics/PhysicsPlayerController.cs b/Experimental/DistributedAuthoritySample/Assets/Scripts/Physics/PhysicsPlayerController.cs index d8f1710e..ee9a0c31 100644 --- a/Experimental/DistributedAuthoritySample/Assets/Scripts/Physics/PhysicsPlayerController.cs +++ b/Experimental/DistributedAuthoritySample/Assets/Scripts/Physics/PhysicsPlayerController.cs @@ -71,13 +71,13 @@ namespace Unity.Multiplayer.Samples.SocialHub.Physics { // Apply force proportional to acceleration while grounded var force = velocityChange * m_PhysicsPlayerControllerSettings.Acceleration; - m_Rigidbody.AddForce(force, ForceMode.Acceleration); + m_Rigidbody.AddForce(force, ForceMode.Force); } else { // Apply reduced force in the air for air control var force = velocityChange * (m_PhysicsPlayerControllerSettings.Acceleration * m_PhysicsPlayerControllerSettings.AirControlFactor); - m_Rigidbody.AddForce(force, ForceMode.Acceleration); + m_Rigidbody.AddForce(force, ForceMode.Force); } // maybe add magnitude check?