Fix pointing arrow trajectory (#25061)

Initial commit
This commit is contained in:
Krunklehorn
2024-02-12 01:45:09 -05:00
committed by GitHub
parent 54ff224428
commit 16b56c7f45

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,