mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 09:54:28 -05:00
slide no longer rotates player
this means that currently the model doesn't rotate but that will be rectified once we have the animations
This commit is contained in:
@@ -60,9 +60,6 @@ public class MoveStateManager : NetworkBehaviour
|
||||
public Vector3 driftVel; // Lerped Movement Vector
|
||||
public float calculatedCurVel; // calculated current vel using driftVel
|
||||
|
||||
//Slide Variables
|
||||
public Vector3 slideUp; // Slide upwards direction
|
||||
|
||||
//Camera Variables
|
||||
private Vector3 camRotation; // cameras camera rotation vector
|
||||
[Range(-45, -15)]
|
||||
@@ -103,8 +100,6 @@ public class MoveStateManager : NetworkBehaviour
|
||||
previousState = IdleState;
|
||||
currentState.EnterState(this, previousState);
|
||||
|
||||
//Slide Upwards Variable
|
||||
slideUp = GetComponentInParent<Transform>().up; // get parents up direction
|
||||
distToGround = GetComponent<Collider>().bounds.extents.y; // set players distance to ground
|
||||
|
||||
if (!IsLocalPlayer) { return; }
|
||||
@@ -220,6 +215,11 @@ public class MoveStateManager : NetworkBehaviour
|
||||
Vector3 moveXZ = new Vector3(vel.x, 0, vel.z);
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.Traction * Time.deltaTime);
|
||||
|
||||
//Need to have movecontroller involved for correct movement
|
||||
if(currentState == CrouchState){
|
||||
driftVel = Vector3.zero;
|
||||
}
|
||||
|
||||
//Actually move he player
|
||||
moveController.Move(driftVel);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user