Class MotionAttribute
On an archetype's Comp<T> field: the component whose spatial field moves the entity, replicated as motion segments (.Motion(comp, …)).
Per archetype, because a spaceship and a walking NPC do not deserve the same tolerance.
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class MotionAttribute : Attribute
- Inheritance
-
MotionAttribute
- Inherited Members
Constructors
MotionAttribute()
public MotionAttribute()
Properties
Grounded
The name of a byte (or bool) field of this component, non-zero while the entity stands on the ground (#1616,
.Grounded): grounded segments then omit the Up axis and the client derives the height from its terrain. null
for an ordinary motion.
public string Grounded { get; set; }
Property Value
MaxAgeS
The heartbeat bounding velocity-rounding drift, seconds; NaN keeps the builder's default (5 s).
public double MaxAgeS { get; set; }
Property Value
TeleportMps
The speed past which a jump is a teleport, metres per second; NaN for none.
public double TeleportMps { get; set; }
Property Value
ToleranceM
The extrapolation error that forces a new segment, metres; NaN keeps the builder's default (5 cm).
public double ToleranceM { get; set; }
Property Value
Up
For a Grounded motion, the vertical axis: 0, 1 (the default, y up) or 2.
public int Up { get; set; }