mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-27 04:44:58 -05:00
Added body parts to networked player
This commit is contained in:
@@ -30,6 +30,11 @@ public class AerialStateManager : NetworkBehaviour
|
||||
////Objects Sections
|
||||
GameObject parentObj; // Parent object
|
||||
public Camera cam;
|
||||
public GameObject stickyHandParent;
|
||||
public LineRenderer lr;
|
||||
public CharacterController handController;
|
||||
public Transform handPosition;
|
||||
public GameObject removeableHand;
|
||||
////
|
||||
|
||||
////Components Section
|
||||
@@ -310,56 +315,56 @@ public class AerialStateManager : NetworkBehaviour
|
||||
}
|
||||
else if(currentState != WallRunState){
|
||||
if(Physics.Raycast(groundRay, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f && Vector3.Dot(groundHit.normal, transform.up) > 0f ){
|
||||
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
|
||||
mSM.CancelMomentum();
|
||||
}
|
||||
}
|
||||
else if(Physics.Raycast(angleRayLeft, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f && Vector3.Dot(groundHit.normal, transform.up) > 0f ){
|
||||
|
||||
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
|
||||
mSM.CancelMomentum();
|
||||
}
|
||||
}
|
||||
else if(Physics.Raycast(angleRayRight, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f && Vector3.Dot(groundHit.normal, transform.up) > 0f ){
|
||||
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
|
||||
mSM.CancelMomentum();
|
||||
}
|
||||
}
|
||||
else if(Physics.Raycast(angleRayForward, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f && Vector3.Dot(groundHit.normal, transform.up) > 0f ){
|
||||
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
|
||||
mSM.CancelMomentum();
|
||||
}
|
||||
}
|
||||
else if(Physics.Raycast(angleRayBackwards, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f && Vector3.Dot(groundHit.normal, transform.up) > 0f ){
|
||||
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
|
||||
mSM.CancelMomentum();
|
||||
}
|
||||
}
|
||||
else if(Physics.Raycast(angleRayLeftR, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f && Vector3.Dot(groundHit.normal, transform.up) > 0f ){
|
||||
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
|
||||
mSM.CancelMomentum();
|
||||
}
|
||||
}
|
||||
else if(Physics.Raycast(angleRayRightL, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f && Vector3.Dot(groundHit.normal, transform.up) > 0f ){
|
||||
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
|
||||
mSM.CancelMomentum();
|
||||
}
|
||||
}
|
||||
else if(Physics.Raycast(angleRayForwardB, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f && Vector3.Dot(groundHit.normal, transform.up) > 0f ){
|
||||
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
|
||||
mSM.CancelMomentum();
|
||||
}
|
||||
}
|
||||
else if(Physics.Raycast(angleRayBackwardsF, out groundHit, moveController.height + groundSlantDistance) && !jumpPressed && curCoyJumpTimer <= 0){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f){
|
||||
if(Vector3.Dot(groundHit.normal, transform.up) <= .8f && Vector3.Dot(groundHit.normal, transform.up) > 0f ){
|
||||
moveController.Move(groundHit.normal * 20 * Time.deltaTime);
|
||||
mSM.CancelMomentum();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user