Weapons/Base/Effects/MeleeSwingEffect.cs
namespace Opium;
public partial class MeleeSwingEffect : WeaponEffect
{
[Property] public Angles WindupAngles { get; set; }
[Property] public Curve WindupCurve { get; set; }
Rotation targetRotation = Rotation.Identity;
public override bool TickEffect()
{
var windupDelta = WindupCurve.Evaluate( Delta );
targetRotation = Rotation.From( WindupAngles.pitch * windupDelta, WindupAngles.yaw * windupDelta, WindupAngles.roll * windupDelta );
if ( Player is not null )
{
Player.CameraRotationOffset *= targetRotation;
}
return base.TickEffect();
}
}