mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-21 09:54:28 -05:00
skyrim is finished mostly
This commit is contained in:
@@ -58,6 +58,7 @@ public class dAerialStateManager : NetworkBehaviour
|
||||
//Ground Check
|
||||
public bool isGrounded; // is player grounded
|
||||
public float groundCheckDistance = 0.05f; // offset distance to check ground
|
||||
public float groundSlantDistance = 0.1f;
|
||||
const float jumpGroundingPreventionTime = 0.2f; // delay so player doesn't get snapped to ground while jumping
|
||||
const float groundCheckDistanceInAir = 0.07f; // How close we have to get to ground to start checking for grounded again
|
||||
Ray groundRay; // ground ray
|
||||
@@ -244,6 +245,14 @@ public class dAerialStateManager : NetworkBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(Physics.Raycast(groundRay, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) > 0f){
|
||||
Debug.Log("On a Slant");
|
||||
Debug.Log("The grounds Normal" + groundHit.normal);
|
||||
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
|
||||
mSM.CancelMomentum();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Actually applies the downwards movement
|
||||
@@ -514,7 +523,7 @@ public class dAerialStateManager : NetworkBehaviour
|
||||
public void GrappleReleaseForce(){
|
||||
if(release){
|
||||
currentForcePower *= .90f;
|
||||
moveController.Move(postForceDirection * currentForcePower);
|
||||
moveController.Move(postForceDirection * currentForcePower * Time.deltaTime);
|
||||
|
||||
if(currentForcePower < .05) release = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user