mirror of
https://github.com/PashaBibko/The-Mobius-Line.git
synced 2026-04-03 17:39:03 +00:00
Fixed portals
Minor visual bugs but I cba to fix them
This commit is contained in:
@@ -6158,6 +6158,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4470023418895194988, guid: c41b43046138ded45bddaab8e10d4cf0, type: 3}
|
||||||
|
propertyPath: m_PortalB
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4470023418895194988, guid: c41b43046138ded45bddaab8e10d4cf0, type: 3}
|
- target: {fileID: 4470023418895194988, guid: c41b43046138ded45bddaab8e10d4cf0, type: 3}
|
||||||
propertyPath: m_PlayerTag
|
propertyPath: m_PlayerTag
|
||||||
value: Player
|
value: Player
|
||||||
@@ -12067,6 +12071,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4470023418895194988, guid: c41b43046138ded45bddaab8e10d4cf0, type: 3}
|
||||||
|
propertyPath: m_PortalB
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4470023418895194988, guid: c41b43046138ded45bddaab8e10d4cf0, type: 3}
|
- target: {fileID: 4470023418895194988, guid: c41b43046138ded45bddaab8e10d4cf0, type: 3}
|
||||||
propertyPath: m_PlayerTag
|
propertyPath: m_PlayerTag
|
||||||
value: Player
|
value: Player
|
||||||
@@ -12132,6 +12140,10 @@ PrefabInstance:
|
|||||||
propertyPath: m_LocalEulerAnglesHint.z
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
value: 0
|
value: 0
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4470023418895194988, guid: c41b43046138ded45bddaab8e10d4cf0, type: 3}
|
||||||
|
propertyPath: m_PortalB
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4470023418895194988, guid: c41b43046138ded45bddaab8e10d4cf0, type: 3}
|
- target: {fileID: 4470023418895194988, guid: c41b43046138ded45bddaab8e10d4cf0, type: 3}
|
||||||
propertyPath: m_PlayerTag
|
propertyPath: m_PlayerTag
|
||||||
value: Player
|
value: Player
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ public class PortalManager : MonoBehaviour
|
|||||||
{
|
{
|
||||||
[Header("References")]
|
[Header("References")]
|
||||||
[SerializeField] GameObject m_OtherPortal;
|
[SerializeField] GameObject m_OtherPortal;
|
||||||
|
[SerializeField] float m_AngleDif;
|
||||||
|
|
||||||
[Header("Set References")]
|
[Header("Set References")]
|
||||||
[SerializeField] GameObject m_CameraPrefab;
|
[SerializeField] GameObject m_CameraPrefab;
|
||||||
@@ -69,8 +70,7 @@ public class PortalManager : MonoBehaviour
|
|||||||
if (PlayerMovement.CanGoThroughPortals() && s_TeleportedThisFrame == true)
|
if (PlayerMovement.CanGoThroughPortals() && s_TeleportedThisFrame == true)
|
||||||
{
|
{
|
||||||
// Rotates the player
|
// Rotates the player
|
||||||
float rotDif = -Quaternion.Angle(transform.rotation, m_OtherManager.transform.rotation);
|
float rotDif = -Quaternion.Angle(transform.rotation, m_OtherManager.transform.rotation) + m_AngleDif;
|
||||||
rotDif += 180.0f;
|
|
||||||
CameraController.Instance().RotatePlayerDirection(new Vector2(0f, rotDif));
|
CameraController.Instance().RotatePlayerDirection(new Vector2(0f, rotDif));
|
||||||
|
|
||||||
// Tellss the player it went through a portal
|
// Tellss the player it went through a portal
|
||||||
|
|||||||
Reference in New Issue
Block a user