mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 09:54:28 -05:00
weather wheel and weather adjustments
This commit is contained in:
@@ -114,6 +114,8 @@ public class MoveStateManager : NetworkBehaviour
|
||||
|
||||
if (!IsLocalPlayer) { return; }
|
||||
Cursor.lockState = CursorLockMode.Locked; // Lock cursor on start if you are the local player
|
||||
pStats.CurTraction = pStats.Traction;
|
||||
pStats.CurAcc = pStats.Acc;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@@ -178,7 +180,7 @@ public class MoveStateManager : NetworkBehaviour
|
||||
// while the speed is below max speed slowly increase it
|
||||
else if ((pStats.CurVel >= pStats.MinVel) && (pStats.CurVel < pStats.MaxVel))
|
||||
{
|
||||
pStats.CurVel += pStats.Acc;
|
||||
pStats.CurVel += pStats.CurAcc;
|
||||
return pStats.CurVel;
|
||||
}
|
||||
//If the players speed is above or equal to max speed set speed to max
|
||||
@@ -219,7 +221,7 @@ public class MoveStateManager : NetworkBehaviour
|
||||
Debug.DrawRay(gameObject.transform.position + new Vector3(0,.4f,0) + rayOffset, moveXZ.normalized * 1f, Color.red);
|
||||
Debug.DrawRay(gameObject.transform.position + new Vector3(0,2.2f,0) + rayOffset, moveXZ.normalized * 1f, Color.red);
|
||||
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.Traction * Time.deltaTime);
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.CurTraction * Time.deltaTime);
|
||||
if(currentState == GrappleAirState){
|
||||
driftVel = Vector3.zero;
|
||||
}
|
||||
@@ -238,7 +240,7 @@ public class MoveStateManager : NetworkBehaviour
|
||||
//player vector should be under the circumstances
|
||||
vel = moveX + moveZ;
|
||||
Vector3 moveXZ = new Vector3(vel.x, 0, vel.z);
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.Traction * Time.deltaTime);
|
||||
driftVel = Vector3.Lerp(driftVel, moveXZ, pStats.CurTraction * Time.deltaTime);
|
||||
|
||||
//Need to have movecontroller involved for correct movement
|
||||
if(currentState == CrouchState){
|
||||
|
||||
Reference in New Issue
Block a user