mirror of
https://github.com/PashaBibko/The-Mobius-Line.git
synced 2026-04-04 01:49:07 +00:00
Added wall riding section
This commit is contained in:
@@ -110,7 +110,7 @@ Camera:
|
|||||||
width: 1
|
width: 1
|
||||||
height: 1
|
height: 1
|
||||||
near clip plane: 0.3
|
near clip plane: 0.3
|
||||||
far clip plane: 1000
|
far clip plane: 100
|
||||||
field of view: 60
|
field of view: 60
|
||||||
orthographic: 0
|
orthographic: 0
|
||||||
orthographic size: 5
|
orthographic size: 5
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -23,8 +23,8 @@ public partial class PlayerMovement : MonoBehaviour
|
|||||||
{ m_State = PlayerState.SLIDING; }
|
{ m_State = PlayerState.SLIDING; }
|
||||||
|
|
||||||
// Checks if the player is in the wall running state
|
// Checks if the player is in the wall running state
|
||||||
// else if (GetNormalOfClosestCollider(out m_WallNormal) && m_WallRunKeyPressed)
|
else if (GetNormalOfClosestCollider(out m_WallNormal) && m_WallRunKeyPressed)
|
||||||
// { m_State = PlayerState.WALL_RUNNING; }
|
{ m_State = PlayerState.WALL_RUNNING; }
|
||||||
|
|
||||||
// Defaults to ruuning
|
// Defaults to ruuning
|
||||||
else { m_State = PlayerState.RUNNING; }
|
else { m_State = PlayerState.RUNNING; }
|
||||||
|
|||||||
@@ -9,17 +9,17 @@ public partial class PlayerMovement : MonoBehaviour
|
|||||||
|
|
||||||
foreach (Collider collision in m_WallCollisions)
|
foreach (Collider collision in m_WallCollisions)
|
||||||
{
|
{
|
||||||
Vector3 pos = Vector3.zero;
|
float distance = Mathf.Infinity;
|
||||||
|
|
||||||
if (collision.GetType() != typeof(MeshCollider))
|
if (collision.GetType() != typeof(MeshCollider))
|
||||||
{
|
{
|
||||||
pos = collision.ClosestPoint(transform.position);
|
Vector3 pos = collision.ClosestPoint(transform.position);
|
||||||
|
|
||||||
|
Vector3 dif = transform.position - pos;
|
||||||
|
|
||||||
|
distance = dif.magnitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector3 dif = transform.position - pos;
|
|
||||||
|
|
||||||
float distance = dif.magnitude;
|
|
||||||
|
|
||||||
dist = Mathf.Min(dist, distance);
|
dist = Mathf.Min(dist, distance);
|
||||||
|
|
||||||
if (dist == distance)
|
if (dist == distance)
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
{
|
{
|
||||||
"type": "UnityEngine.ProBuilder.SelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.ProBuilder.SelectMode, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "editor.lastMeshSelectMode",
|
"key": "editor.lastMeshSelectMode",
|
||||||
"value": "{\"m_Value\":2}"
|
"value": "{\"m_Value\":8}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "UnityEngine.ProBuilder.SelectionModifierBehavior, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.ProBuilder.SelectionModifierBehavior, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
@@ -174,7 +174,7 @@
|
|||||||
{
|
{
|
||||||
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.Vector3, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
"key": "ShapeBuilder.LastSize",
|
"key": "ShapeBuilder.LastSize",
|
||||||
"value": "{\"m_Value\":{\"x\":1.0,\"y\":-1.0305825471878052,\"z\":1.0}}"
|
"value": "{\"m_Value\":{\"x\":23.061302185058595,\"y\":10.831178665161133,\"z\":23.66290283203125}}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
"type": "UnityEngine.Quaternion, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
@@ -220,6 +220,16 @@
|
|||||||
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
"key": "meshImporter.smoothingAngle",
|
"key": "meshImporter.smoothingAngle",
|
||||||
"value": "{\"m_Value\":1.0}"
|
"value": "{\"m_Value\":1.0}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
|
||||||
|
"key": "ExtrudeFaces.distance",
|
||||||
|
"value": "{\"m_Value\":0.5}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "UnityEngine.ProBuilder.ExtrudeMethod, Unity.ProBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null",
|
||||||
|
"key": "editor.extrudeMethod",
|
||||||
|
"value": "{\"m_Value\":2}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user