2.5d aiming
how do i make aiming for 2.5d shooter? Right now i have FPS aiming, where if i move my mouse down, character aims down. public void HandleThirdPersonAiming() { if (ThirdPersonPhotonView.isMine) { //If this is our instance of the game float AimAngle = PlayerCamera.transform.localRotation.x; //Get get our current local aimangle PlayerThirdPersonAnimator.SetFloat ("AimAngle", AimAngle * 1.5f); //Set the float AimAngle in the animator on our player instance if (ThirdPersonWorldWeapon != null && WeaponIK && ThirdPersonWorldWeapon.GetComponent ().LeftHandTransform != null) { LeftHand.position = ThirdPersonWorldWeapon.GetComponent ().LeftHandTransform.position; if (ThirdPersonWorldWeapon.GetComponent ().IgnoreLeftHandRotation == false) { LeftHand.rotation = ThirdPersonWorldWeapon.GetComponent ().LeftHandTransform.rotation; } } } if (!ThirdPersonPhotonView.isMine) { //If this is a other player PlayerThirdPersonAnimator.SetFloat ("AimAngle", Mathf.Lerp (PlayerThirdPersonAnimator.GetFloat ("AimAngle"), SyncedAimangle, 0.05f)); //Lerp the aimangle so it looks smooth on our instance if (ThirdPersonWorldWeapon != null && WeaponIK && ThirdPersonWorldWeapon.GetComponent ().LeftHandTransform != null) { LeftHand.position = ThirdPersonWorldWeapon.GetComponent ().LeftHandTransform.position; if (ThirdPersonWorldWeapon.GetComponent ().IgnoreLeftHandRotation == false) { LeftHand.rotation = ThirdPersonWorldWeapon.GetComponent ().LeftHandTransform.rotation; } } } }
Your answer
![](https://koobas.hobune.stream/wayback/20220612172255im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Input.GetKeyDown() and Input.GetKeyUp() dosent work every every time 1 Answer
Tanks turret rotate, not snap. 1 Answer
Rotate car wheels with mouse position and not arrow keys 0 Answers
BoatRiderController? 1 Answer
Leap Motion Does Not Break 0 Answers