mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-14 16:27:19 +00:00
Spine's direction is obtained from aim direction
This commit is contained in:
parent
cb92bdd3dd
commit
10b5e541bc
1 changed files with 3 additions and 3 deletions
|
@ -121,13 +121,13 @@ namespace SanAndreasUnity.Behaviours.Peds.States
|
|||
if (ped.CurrentWeapon.HasFlag (GunFlag.AIMWITHARM))
|
||||
return;
|
||||
|
||||
// TODO: spine's forward vector should be the same as aim direction
|
||||
// this will not work for peds without camera
|
||||
ped.PlayerModel.Spine.LookAt(ped.Camera.transform.position + ped.Camera.transform.forward * 500);
|
||||
ped.PlayerModel.Spine.forward = ped.AimDirection;
|
||||
|
||||
// now apply offset to spine rotation
|
||||
// this has to be done because spine is not rotated properly - is it intentionally done, or is it error in model importing ?
|
||||
|
||||
// TODO: actually, spine direction should be the same as ped's direction, not aim direction
|
||||
|
||||
Vector3 eulers = ped.WeaponHolder.SpineOffset;
|
||||
if (ped.CurrentWeapon.HasFlag (GunFlag.AIMWITHARM))
|
||||
eulers.y = 0;
|
||||
|
|
Loading…
Reference in a new issue