mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 14:29:25 +00:00
ocd
This commit is contained in:
parent
04f35bdc54
commit
dcde01c2a9
9 changed files with 26 additions and 27 deletions
|
@ -22,7 +22,7 @@ public class MovementSystemTracker : MonoBehaviour
|
|||
VRModeSwitchTracker.OnPostVRModeSwitch -= PostVRModeSwitch;
|
||||
}
|
||||
|
||||
public void PreVRModeSwitch(bool enterVR, Camera activeCamera)
|
||||
public void PreVRModeSwitch(bool isVR, Camera activeCamera)
|
||||
{
|
||||
//correct rotationPivot y position, so we dont teleport up/down
|
||||
Vector3 position = movementSystem.rotationPivot.transform.position;
|
||||
|
@ -36,11 +36,11 @@ public class MovementSystemTracker : MonoBehaviour
|
|||
//so the user can still switch even if avatar is null (if it failed to load for example).
|
||||
}
|
||||
|
||||
public void PostVRModeSwitch(bool enterVR, Camera activeCamera)
|
||||
public void PostVRModeSwitch(bool isVR, Camera activeCamera)
|
||||
{
|
||||
//lazy way of correcting Desktop & VR offset issue (game does the maths)
|
||||
movementSystem.TeleportToPosRot(preSwitchWorldPosition, preSwitchWorldRotation, false);
|
||||
//recenter desktop collision to player object
|
||||
if (!enterVR) movementSystem.UpdateColliderCenter(movementSystem.transform.position);
|
||||
if (!isVR) movementSystem.UpdateColliderCenter(movementSystem.transform.position);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue