Skip to content

Commit

Permalink
Small hand override tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
DaXcess committed Aug 5, 2024
1 parent 311666e commit b80bfe6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Some bindings are blacklisted from being used, mostly the "touched" bindings on
- Added VR support for the Weed Killer item
- Added haptic feedback to the muffle interaction
- Added haptic feedback to the monitor buttons in the ship
- Added new option: `SpectatorLightRemovesVolumetrics`, which disables fog when using the spectator light (if enabled)

**Bug Fixes**:

Expand All @@ -66,6 +67,7 @@ Some bindings are blacklisted from being used, mostly the "touched" bindings on
- Fixed bug where the controllers sometimes kept vibrating after the player already died
- (Accidentally) fixed a bug where the keyboard on the terminal would be unusable if the ship was in motion
- Fixed issue where players in an animation wouldn't sync their offset to their room center with other players
- Fixed a vanilla bug where sometimes you could "ghost interact" with battery powered items by using grip buttons

**Changes**:

Expand Down
16 changes: 16 additions & 0 deletions Source/Networking/VRNetPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ private void LateUpdate()

return;
}

// Break snap if distance is too great
if (Vector3.Distance(leftOverride.transform.position, leftHandVRTarget.position) > 2)
{
leftHandTargetOverride = null;

return;
}

Bones.LeftArmRigTarget.position = leftOverride.transform.TransformPoint(leftOverride.positionOffset);
Bones.LeftArmRigTarget.rotation =
Expand All @@ -274,6 +282,14 @@ private void LateUpdate()

return;
}

// Break snap if distance is too great
if (Vector3.Distance(rightOverride.transform.position, rightHandVRTarget.position) > 2)
{
rightHandTargetOverride = null;

return;
}

Bones.RightArmRigTarget.position = rightOverride.transform.TransformPoint(rightOverride.positionOffset);
Bones.RightArmRigTarget.rotation =
Expand Down

0 comments on commit b80bfe6

Please sign in to comment.