mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2025-03-05 07:37:17 +00:00
fix RotatePedInDirectionOfAiming(): it uses aim direction instead of camera direction
This commit is contained in:
parent
64f30f6063
commit
4551cb67e9
1 changed files with 1 additions and 3 deletions
|
@ -155,9 +155,7 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
//
|
||||
// m_player.transform.LookAt (lookAtPos, Vector3.up);
|
||||
|
||||
// TODO: this will not work if ped doesn't have camera
|
||||
|
||||
Vector3 forward = ped.Camera.transform.forward;
|
||||
Vector3 forward = ped.AimDirection;
|
||||
forward.y = 0;
|
||||
forward.Normalize ();
|
||||
// m_player.transform.forward = forward;
|
||||
|
|
Loading…
Add table
Reference in a new issue