Skip to content

Commit

Permalink
Fixed references to work with current version of LIV
Browse files Browse the repository at this point in the history
  • Loading branch information
Morichalion committed Aug 9, 2020
1 parent a485c05 commit ca85697
Show file tree
Hide file tree
Showing 20 changed files with 54 additions and 22 deletions.
Binary file modified .vs/MoriBScam/v16/.suo
Binary file not shown.
Binary file added .vs/MoriBeatSaberCamera/v16/.suo
Binary file not shown.
3 changes: 3 additions & 0 deletions .vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
6 changes: 6 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
8 changes: 6 additions & 2 deletions MonoBehaviors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,13 @@ public void OnUpdate()
updatepostion = false;
try
{
this.transform.parent = _helper.manager.camera.worldCamera.transform;
this.transform.parent = _helper.behaviour.manager.camera.transform;
//this.transform.parent = _helper.manager.camera.worldCamera.transform;

this.transform.localPosition = position;
this.transform.rotation = _helper.manager.camera.worldCamera.transform.rotation;

this.transform.rotation = _helper.behaviour.manager.camera.transform.rotation;
//this.transform.rotation = _helper.manager.camera.worldCamera.transform.rotation;
this.transform.Rotate(-90.0f, 0f, 0f);
debug("Should have updated the parent, position, and rotation of the overlay. ");
}
Expand Down
38 changes: 20 additions & 18 deletions MoriBScam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class MoriBScam : IPluginCameraBehaviour {
// Author name.
public string author => "Morichalion";
// Plugin version.
public string version => "0.0.20";
public string version => "0.1.2";
// Localy store the camera helper provided by LIV.
PluginCameraHelper _helper;
//float _elaspedTime;
Expand Down Expand Up @@ -448,11 +448,13 @@ public void OnActivate(PluginCameraHelper helper) {
} catch (Exception e) { debug("found it: " + e.Message); }


//Find reference WorldCamera so UI stuff can be attached to it.

Transform blah = _helper.manager.camera.worldCamera.transform;
//Found WorldCamera. Set overlay as child and resize/rotate it.
overlay.transform.parent = blah.transform;
//Find reference WorldCamera so UI stuff can be attached to it.

//Transform blah = _helper.manager.camera.worldCamera.transform;
Transform blah = _helper.behaviour.manager.camera.transform;

//Found WorldCamera. Set overlay as child and resize/rotate it.
overlay.transform.parent = blah.transform;
overlay.transform.transform.rotation = blah.transform.rotation;
debug("trying to set overlay offset X:" + overlayOffsetX + " Y:" + overlayOffsetY);
overlay.transform.transform.localPosition = new Vector3((overlayOffsetX + 0f), overlayOffsetY + .05f, 1.0f);
Expand Down Expand Up @@ -727,6 +729,7 @@ public void OnActivate(PluginCameraHelper helper) {

public float handsraised = 0.0f;
private float buttondown = 0.0f;
/*
public void ManualSwitcher()
{
try
Expand Down Expand Up @@ -780,7 +783,7 @@ public void ManualSwitcher()
}
}
}

*/
public void NotifyUser()
{
//adds a notification to the user.
Expand Down Expand Up @@ -907,7 +910,7 @@ public void OnUpdate() {
FollowCam();
}
}
ManualSwitcher();
//ManualSwitcher();
OnUpdateEnd:
;
}
Expand Down Expand Up @@ -997,8 +1000,8 @@ public void MenuCam()
Vector3 lookvector = camLook - camPosition;
camRotation = Quaternion.LookRotation(lookvector);

_helper.UpdateCameraPose(camPosition, camRotation);
_helper.UpdateFov(_settings.fov);
_helper.UpdateCameraPose(camPosition, camRotation,_settings.fov);



}
Expand Down Expand Up @@ -1060,8 +1063,8 @@ public void DefaultGameCam()
camRotation = Quaternion.LookRotation(lookvector);


_helper.UpdateCameraPose(camPosition, camRotation);
_helper.UpdateFov(_settings.fov);
_helper.UpdateCameraPose(camPosition, camRotation,_settings.fov);


}
/*
Expand Down Expand Up @@ -1187,8 +1190,7 @@ public void RigCam()
Quaternion rot = Quaternion.LookRotation(looky);


_helper.UpdateCameraPose(RigCamCamera.transform.position, rot);
_helper.UpdateFov(_settings.fov);
_helper.UpdateCameraPose(RigCamCamera.transform.position, rot,_settings.fov);



Expand Down Expand Up @@ -1220,8 +1222,8 @@ public void FollowCam()
Vector3 lookvector = camLook - camPosition;
camRotation = Quaternion.LookRotation(lookvector);

_helper.UpdateCameraPose(camPosition, camRotation);
_helper.UpdateFov(_settings.fov);
_helper.UpdateCameraPose(camPosition, camRotation,_settings.fov);

}
public void FPCam()
{
Expand All @@ -1235,7 +1237,7 @@ public void FPCam()
camPosition = Vector3.Lerp(camPosition, head.position, 5.0f * Time.deltaTime);
camRotation = Quaternion.Lerp(camRotation, head.rotation, 5.0f * Time.deltaTime);

_helper.UpdateCameraPose(camPosition, camRotation);
_helper.UpdateFov(_settings.fov);
_helper.UpdateCameraPose(camPosition, camRotation, _settings.fov);

}
}
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,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("0.0.20")]
[assembly: AssemblyFileVersion("0.0.20")]
[assembly: AssemblyVersion("0.1.2")]
[assembly: AssemblyFileVersion("0.1.2")]
Binary file added bin/MoriBScam.dll
Binary file not shown.
Binary file added bin/Newtonsoft.Json.dll
Binary file not shown.
Binary file added bin/UnityEngine.AnimationModule.dll
Binary file not shown.
Binary file added bin/UnityEngine.AssetBundleModule.dll
Binary file not shown.
Binary file added bin/UnityEngine.ImageConversionModule.dll
Binary file not shown.
Binary file added bin/UnityEngine.Networking.dll
Binary file not shown.
Binary file added bin/UnityEngine.TextRenderingModule.dll
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6", FrameworkDisplayName = ".NET Framework 4.6")]
1 change: 1 addition & 0 deletions obj/x64/Plugin/MoriBScam.csproj.CoreCompileInputs.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e8157ab91968d410869215709483dffbc85c31ec
12 changes: 12 additions & 0 deletions obj/x64/Plugin/MoriBScam.csproj.FileListAbsolute.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,15 @@ C:\Users\thelr\Documents\GitHub\MoriBeatSaberCamera\bin\websocket-sharp.dll
C:\Users\thelr\Documents\GitHub\MoriBeatSaberCamera\obj\x64\Plugin\MoriBScam.csprojAssemblyReference.cache
C:\Users\thelr\Documents\GitHub\MoriBeatSaberCamera\obj\x64\Plugin\MoriBScam.csproj.CopyComplete
C:\Users\thelr\Documents\GitHub\MoriBeatSaberCamera\obj\x64\Plugin\MoriBScam.dll
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\bin\MoriBScam.dll
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\bin\Newtonsoft.Json.dll
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\bin\UnityEngine.AnimationModule.dll
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\bin\UnityEngine.AssetBundleModule.dll
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\bin\UnityEngine.ImageConversionModule.dll
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\bin\UnityEngine.Networking.dll
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\bin\UnityEngine.TextRenderingModule.dll
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\bin\websocket-sharp.dll
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\obj\x64\Plugin\MoriBScam.csprojAssemblyReference.cache
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\obj\x64\Plugin\MoriBScam.csproj.CoreCompileInputs.cache
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\obj\x64\Plugin\MoriBScam.csproj.CopyComplete
C:\Users\thelr\Source\Repos\Morichalion\MoriBeatSaberCamera\obj\x64\Plugin\MoriBScam.dll
Binary file modified obj/x64/Plugin/MoriBScam.csprojAssemblyReference.cache
Binary file not shown.
Binary file modified obj/x64/Plugin/MoriBScam.dll
Binary file not shown.

0 comments on commit ca85697

Please sign in to comment.