using Sandbox;
public sealed class MatchEyeAngles : Component, PlayerController.IEvents
{
void PlayerController.IEvents.OnEyeAngles( ref Angles angles )
{
// the input angles are just temporary, we need the full ones
WorldRotation = GetComponentInParent<PlayerController>().EyeAngles.WithPitch(90) * Rotation.FromRoll(-90);
}
}