2
0
Fork 0
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:
in0finite 2019-07-07 18:05:04 +02:00
parent 64f30f6063
commit 4551cb67e9

View file

@ -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;