Weapons are now in correct position

When u switch or pickup weapons u have them now in your hand.

- Scrollup doesnt work on the highest weapon index (will be fixed soon)
- Shooting with the hand will give an error because there is no animation "shoot" on the hand (PLEASE someone make an animation for the hand!!!!)
This commit is contained in:
Noah4ever
2021-11-29 11:22:03 +01:00
parent ad1e0cfeef
commit 59ff72d498
8 changed files with 157 additions and 119 deletions

View File

@@ -102,6 +102,9 @@ public class ProcedualAnimationController : NetworkBehaviour
Vector3[] positionMod = new Vector3[3];
public Quaternion[] rotationMod = new Quaternion[3];
public Transform GunRightHandREF { get => gunRightHandREF; set => gunRightHandREF = value; }
public Transform GunLeftHandREF { get => gunLeftHandREF; set => gunLeftHandREF = value; }
public void walkAnimation()
{
playerAnimator.SetFloat("x", playerController.localVelocity.x / playerController.currentMaxSpeed);
@@ -119,10 +122,10 @@ public class ProcedualAnimationController : NetworkBehaviour
{
rightHandREF.position = defaultRightHandPosition;
}
if (gunLeftHandREF != null)
if (GunLeftHandREF != null)
{
leftHandREF.position = gunLeftHandREF.position;
leftHandREF.rotation = gunLeftHandREF.rotation;
leftHandREF.position = GunLeftHandREF.position;
leftHandREF.rotation = GunLeftHandREF.rotation;
}
else
{