wip: add aim
This commit is contained in:
@ -1,29 +1,31 @@
|
||||
using System;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using static scr_Models;
|
||||
|
||||
public class scr_WeaponController : MonoBehaviour
|
||||
{
|
||||
private scr_CharacterController characterController;
|
||||
[Header("Settings")]
|
||||
[Header("Settings")]
|
||||
public WeaponSettingsModel settings;
|
||||
|
||||
|
||||
[Header("References")]
|
||||
|
||||
public Animator weaponAnimator;
|
||||
|
||||
private bool isInitialised;
|
||||
|
||||
Vector3 newWeaponRotation;
|
||||
Vector3 newWeaponRotationVelocity;
|
||||
|
||||
|
||||
Vector3 targetWeaponRotation;
|
||||
Vector3 targetWeaponRotationVelocity;
|
||||
|
||||
|
||||
Vector3 newWeaponMovementRotation;
|
||||
Vector3 newWeaponRotationMovementVelocity;
|
||||
|
||||
|
||||
Vector3 targetWeaponMovementRotation;
|
||||
Vector3 targetWeaponMovementRotationVelocity;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
newWeaponRotation = transform.localRotation.eulerAngles;
|
||||
@ -45,7 +47,6 @@ public class scr_WeaponController : MonoBehaviour
|
||||
CalculateWeaponRotation();
|
||||
SetWeaponAnimation();
|
||||
}
|
||||
|
||||
private void CalculateWeaponRotation()
|
||||
{
|
||||
weaponAnimator.speed = characterController.weaponAnimationSpeed;
|
||||
|
Reference in New Issue
Block a user