Fix pointing arrow trajectory (#25061)

Initial commit

(cherry picked from commit 16b56c7f4564cba373be8d34a09e9d6a55a1a01d)
This commit is contained in:
Krunklehorn 2024-02-12 01:45:09 -05:00 committed by Debug
parent aab05aead2
commit bb71b4f15b
No known key found for this signature in database
GPG Key ID: 271270A74EF9C350
1 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,8 @@
using Content.Client.Pointing.Components;
using Content.Shared.Pointing;
using Robust.Client.GameObjects;
using Robust.Client.Animations;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Animations;
using System.Numerics;
@ -9,7 +10,9 @@ namespace Content.Client.Pointing;
public sealed partial class PointingSystem : SharedPointingSystem
{
[Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly AnimationPlayerSystem _animationPlayer = default!;
[Dependency] private readonly TransformSystem _transformSystem = default!;
public void InitializeVisualizer()
{
@ -27,6 +30,8 @@ public sealed partial class PointingSystem : SharedPointingSystem
if (_animationPlayer.HasRunningAnimation(uid, animationKey))
return;
startPosition = new Angle(_eyeManager.CurrentEye.Rotation + _transformSystem.GetWorldRotation(uid)).RotateVec(startPosition);
var animation = new Animation
{
Length = PointDuration,