Show / Hide Table of Contents

Class MouseRotatorComponent

This component allows overriding an entities local rotation based on the client's mouse movement

Inheritance
System.Object
MouseRotatorComponent
Namespace: Content.Shared.MouseRotator
Assembly: Content.Shared.dll
Syntax
public sealed class MouseRotatorComponent : Component

Fields

| Improve this Doc View Source

AngleTolerance

How much the desired angle needs to change before a predictive event is sent

Declaration
public Angle AngleTolerance
Field Value
Type Description
Angle
| Improve this Doc View Source

GoalRotation

The angle that will be lerped to

Declaration
public Angle? GoalRotation
Field Value
Type Description
System.Nullable<Angle>
| Improve this Doc View Source

RotationSpeed

Max degrees the entity can rotate per second

Declaration
public double RotationSpeed
Field Value
Type Description
System.Double
| Improve this Doc View Source

Simple4DirMode

This one is important. If this is true, AngleTolerance does not apply, and the system will use RequestMouseRotatorRotationSimpleEvent instead. In this mode, the client will only send events when an entity should snap to a different cardinal direction, rather than for every angle change.

This is useful for cases like humans, where what really matters is the visual sprite direction, as opposed to something like turrets or ship guns, which have finer range of movement.

Declaration
public bool Simple4DirMode
Field Value
Type Description
System.Boolean
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾