mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-22 02:14:30 -05:00
Fixed an issue with wallrun moving the player up
Still needs adjustments to be more flexible and maybe allow the player to wall run from standing still to allow for vertical wallrun sections.
This commit is contained in:
@@ -27,6 +27,7 @@ public class dWallRun : NetworkBehaviour
|
||||
RaycastHit[] hits;
|
||||
|
||||
bool isWallRunning = false;
|
||||
public bool firstAttach = false;
|
||||
Vector3 lastWallPosition;
|
||||
Vector3 lastWallNormal;
|
||||
float elapsedTimeSinceJump = 0;
|
||||
@@ -173,7 +174,11 @@ public class dWallRun : NetworkBehaviour
|
||||
//
|
||||
|
||||
playerMovementController.SetPlayerVelocity(moveToSet);
|
||||
isWallRunning = true;
|
||||
if(!isWallRunning){
|
||||
firstAttach = true;
|
||||
isWallRunning = true;
|
||||
}
|
||||
|
||||
if(playerMovementController.curJumpNum == playerMovementController.pStats.JumpNum){
|
||||
playerMovementController.curJumpNum = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user