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 SourceAngleTolerance
How much the desired angle needs to change before a predictive event is sent
Declaration
public Angle AngleTolerance
Field Value
Type | Description |
---|---|
Angle |
GoalRotation
The angle that will be lerped to
Declaration
public Angle? GoalRotation
Field Value
Type | Description |
---|---|
System.Nullable<Angle> |
RotationSpeed
Max degrees the entity can rotate per second
Declaration
public double RotationSpeed
Field Value
Type | Description |
---|---|
System.Double |
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 |