Skip to content

Commit

Permalink
Supports Player Track for new Noodle Extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Snow1226 committed Jun 21, 2021
1 parent b075b89 commit 3552274
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
18 changes: 9 additions & 9 deletions CameraPlus/Behaviours/CameraPlusBehaviour.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ protected IEnumerator DelayedInit()

if (Config.VMCProtocolMode == "sender")
InitExternalSender();

if (CameraUtilities.seekBar == null)
CameraUtilities.CreatSeekbarTexture();
}

public void InitExternalSender()
Expand Down Expand Up @@ -414,12 +411,12 @@ public virtual void SceneManager_activeSceneChanged(Scene from, Scene to)

StartCoroutine(GetMainCamera());
StartCoroutine(Get360Managers());

/*
var pointer = VRPointerPatch.Instance;
if (_moverPointer) Destroy(_moverPointer);
_moverPointer = pointer.gameObject.AddComponent<CameraMoverPointer>();
_moverPointer.Init(this, _cameraCube);

*/
if (to.name == "GameCore")
SharedCoroutineStarter.instance.StartCoroutine(Delayed_activeSceneChanged(from, to));
else
Expand Down Expand Up @@ -476,15 +473,18 @@ protected virtual void LateUpdate()
{
if (FPFCPatch.isInstanceFPFC)
{
if (isFPFC != FPFCPatch.instance.isActiveAndEnabled)
if (isFPFC != FPFCPatch.isInstanceFPFC)
{
isFPFC = FPFCPatch.instance.enabled;
isFPFC = FPFCPatch.isInstanceFPFC;
turnToHead = false;
replaceFPFC = true;
CreateScreenRenderTexture();
}
else
{
isFPFC = FPFCPatch.isInstanceFPFC;
turnToHead = Config.turnToHead;
}
}
#if WithVMCAvatar
if (Plugin.cameraController.existsVMCAvatar)
Expand Down Expand Up @@ -512,7 +512,7 @@ protected virtual void LateUpdate()
Plugin.cameraController.origin = new GameObject("OriginParent").transform;
}
adjustParent.transform.position = Plugin.cameraController.origin.position - RoomAdjustPatch.position;
adjustParent.transform.localRotation = Plugin.cameraController.origin.localRotation * Quaternion.Inverse(RoomAdjustPatch.rotation);
adjustParent.transform.rotation = Plugin.cameraController.origin.rotation * Quaternion.Inverse(RoomAdjustPatch.rotation);

adjustOffset.transform.localPosition = ThirdPersonPos;
adjustOffset.transform.localEulerAngles = ThirdPersonRot;
Expand All @@ -536,7 +536,7 @@ protected virtual void LateUpdate()
transform.position += OffsetPosition;

}
if (turnToHead)
if (turnToHead && !isFPFC)
{
turnToTarget = Camera.main.transform;
turnToTarget.transform.position += turnToHeadOffset;
Expand Down
3 changes: 3 additions & 0 deletions CameraPlus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v5.2.2 Changes
- Supports Player Track for new Noodle Extensions.

# v5.2.1 Changes
- buf fix (It failed to destroy VRPointer internally and was mass-produced every time the profile was loaded.)
- Re-register code for 1.15.0 and below.
Expand Down
4 changes: 2 additions & 2 deletions CameraPlus/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.2.1")]
[assembly: AssemblyFileVersion("5.2.1")]
[assembly: AssemblyVersion("5.2.2")]
[assembly: AssemblyFileVersion("5.2.2")]
2 changes: 1 addition & 1 deletion CameraPlus/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "CameraPlus",
"name": "CameraPlus",
"author": "Various Modders",
"version": "5.2.1",
"version": "5.2.2",
"description": "CameraPlus is a Beat Saber mod that allows for multiple wide FOV cameras with smoothed movement.",
"gameVersion": "1.16.2",
"dependsOn": {
Expand Down

0 comments on commit 3552274

Please sign in to comment.