using Sandbox; public sealed class Teleporter : Component, Component.ITriggerListener { [Property] public GameObject ToPosGameObject { get; set; } public void OnTriggerEnter( Collider other ) { var otherEntity = other.GameObject; Log.Info($"{otherEntity.Name} Телепорт"); if (otherEntity.Components.TryGet(out var controller)) { Log.Info($"{otherEntity.Name} вошел в зону телепорта"); otherEntity.WorldPosition = ToPosGameObject.WorldPosition; controller.OverrideGravity = Vector3.Down; controller.EyeAngles = new Angles( 0, 180, 0 ).ToRotation(); controller.Renderer.LocalRotation = new Angles( 0, 180, 0 ).ToRotation(); } } }