Show / Hide Table of Contents

Class RotateToFaceSystem

Contains common code used to rotate a player to face a given target or direction. This interaction in itself is useful for various roleplay purposes. But it needs specialized code to handle chairs and such. Doesn't really fit with SharedInteractionSystem so it's not there.

Inheritance
System.Object
RotateToFaceSystem
Namespace: Content.Shared.Interaction
Assembly: Content.Shared.dll
Syntax
public sealed class RotateToFaceSystem : EntitySystem

Methods

| Improve this Doc View Source

TryFaceAngle(EntityUid, Angle, Nullable<TransformComponent>)

Declaration
public bool TryFaceAngle(EntityUid user, Angle diffAngle, TransformComponent? xform = null)
Parameters
Type Name Description
EntityUid user
Angle diffAngle
System.Nullable<TransformComponent> xform
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryFaceCoordinates(EntityUid, Vector2, Nullable<TransformComponent>)

Declaration
public bool TryFaceCoordinates(EntityUid user, Vector2 coordinates, TransformComponent? xform = null)
Parameters
Type Name Description
EntityUid user
Vector2 coordinates
System.Nullable<TransformComponent> xform
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryRotateTo(EntityUid, Angle, Single, Angle, Double, Nullable<TransformComponent>)

Tries to rotate the entity towards the target rotation. Returns false if it needs to keep rotating.

Declaration
public bool TryRotateTo(EntityUid uid, Angle goalRotation, float frameTime, Angle tolerance, double rotationSpeed = null, TransformComponent? xform = null)
Parameters
Type Name Description
EntityUid uid
Angle goalRotation
System.Single frameTime
Angle tolerance
System.Double rotationSpeed
System.Nullable<TransformComponent> xform
Returns
Type Description
System.Boolean
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾