private Quaternion qRotation; //This allows me to calculate it in Update and apply it in FixedUpdate. private void Start() { rb = GetComponent <Rigidbody>(); animController = GetComponent <HeroAnimationController>(); InputHandler.PlayerController.onMove += CalculateMovement; InputHandler.PlayerController.onAim += CalculateRotation; }
void Awake() { mHeroAnimationController = gameObject.GetComponent <HeroAnimationController> (); HeroRigidbody2D = gameObject.GetComponent <Rigidbody2D> (); }