Skip to content

Commit

Permalink
Quick Fix for non-FBT users
Browse files Browse the repository at this point in the history
  • Loading branch information
200Tigersbloxed committed May 22, 2024
1 parent 7adbca8 commit 0b8a919
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions Assets/Scripts/Game/Avatar/NetAvatarCreator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,21 @@ internal void Update(bool fbt)
MainAnimator.cullingMode = AnimatorCullingMode.AlwaysAnimate;
if (vrik != null && Calibrated)
{
vrik.solver.spine.pelvisPositionWeight = 1f;
vrik.solver.spine.pelvisRotationWeight = 1f;
vrik.solver.locomotion.weight = isMoving || fbt ? 0f : 1f;
if (!fbt)
if(fbt)
{
vrik.solver.spine.pelvisPositionWeight = 1f;
vrik.solver.spine.pelvisRotationWeight = 1f;
}
else
{
float scale = LocalPlayer.Instance.transform.localScale.y;
float height = LocalPlayer.Instance.CharacterController.height;
vrik.solver.locomotion.footDistance = 0.1f * scale * height;
vrik.solver.locomotion.stepThreshold = 0.2f * scale * height;
vrik.solver.spine.pelvisPositionWeight = 0;
vrik.solver.spine.pelvisRotationWeight = 0;
}
vrik.solver.locomotion.weight = isMoving || fbt ? 0f : 1f;
if(MainAnimator.runtimeAnimatorController == null)
MainAnimator.runtimeAnimatorController = animatorController;
}
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Game/Bindings/XRTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Hypernex.Game.Bindings
{
public class XRTracker : MonoBehaviour
{
private const int MAX_STEPS = 1000;
private const int MAX_STEPS = 100;

public static List<XRTracker> Trackers => new(_trackers);
private static readonly List<XRTracker> _trackers = new();
Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Init.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

public class Init : MonoBehaviour
{
public const string VERSION = "2024.05.1b";
public const string VERSION = "2024.05.2b";

public static Init Instance;
public static bool IsQuitting { get; private set; }
Expand Down

0 comments on commit 0b8a919

Please sign in to comment.