mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-03-10 16:14:45 +00:00
fix probe cameras not rotating properly
This commit is contained in:
parent
f9dc544405
commit
6984421034
@ -11,7 +11,6 @@ public class QSBProbeCamera : MonoBehaviour
|
|||||||
|
|
||||||
private OWCamera _camera;
|
private OWCamera _camera;
|
||||||
private RenderTexture _snapshotTexture;
|
private RenderTexture _snapshotTexture;
|
||||||
private NoiseImageEffect _noiseEffect;
|
|
||||||
private static OWCamera _lastSnapshotCamera;
|
private static OWCamera _lastSnapshotCamera;
|
||||||
private Quaternion _origLocalRotation;
|
private Quaternion _origLocalRotation;
|
||||||
private Quaternion _origParentLocalRotation;
|
private Quaternion _origParentLocalRotation;
|
||||||
@ -23,10 +22,10 @@ public class QSBProbeCamera : MonoBehaviour
|
|||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
|
_origLocalRotation = transform.localRotation;
|
||||||
|
_origParentLocalRotation = transform.parent.localRotation;
|
||||||
_camera = this.GetRequiredComponent<OWCamera>();
|
_camera = this.GetRequiredComponent<OWCamera>();
|
||||||
_camera.enabled = false;
|
_camera.enabled = false;
|
||||||
_noiseEffect = GetComponent<NoiseImageEffect>();
|
|
||||||
//this._snapshotTexture = ProbeCamera.GetSharedSnapshotTexture();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
@ -58,11 +57,6 @@ public class QSBProbeCamera : MonoBehaviour
|
|||||||
public RenderTexture TakeSnapshot()
|
public RenderTexture TakeSnapshot()
|
||||||
{
|
{
|
||||||
_lastSnapshotCamera = _camera;
|
_lastSnapshotCamera = _camera;
|
||||||
if (_noiseEffect != null)
|
|
||||||
{
|
|
||||||
_noiseEffect.enabled = HasInterference();
|
|
||||||
}
|
|
||||||
|
|
||||||
_camera.targetTexture = _snapshotTexture;
|
_camera.targetTexture = _snapshotTexture;
|
||||||
_camera.Render();
|
_camera.Render();
|
||||||
return _snapshotTexture;
|
return _snapshotTexture;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user