A struct in Root.Township, the global namespace.
The network message sent when a hand starts holding an entity: the held entity, its velocity and pose, the hand's pose, and force flags.
Constructors
| Member | What it is |
|---|
InteractArguments(Interactor holder, NetworkEntity held, bool isForced = false, bool isForcingHold = false) | Creates an InteractArguments from interactorTarget, held, heldVelocity, heldAngularVelocity, isForced and isForcingHold. |
InteractArguments(NetworkEntity interactor, NetworkEntity held, Vector3 velocity, Vector3 angularVelocity, bool isForced = false, bool isForcingHold = false) | Creates an InteractArguments from interactorTarget, held, heldVelocity, heldAngularVelocity, isForced and isForcingHold. |
1 private and internal constructor
| Member | What it is |
|---|
private InteractArguments(Transform interactorTarget, NetworkEntity held, Vector3 heldVelocity, Vector3 heldAngularVelocity, bool isForced, bool isForcingHold) | Creates an InteractArguments from interactorTarget, held, heldVelocity, heldAngularVelocity, isForced and isForcingHold. |
Fields
| Member | What it is |
|---|
Vector3 angularVelocity | Angular velocity of the held entity. |
Vector3 interactorPosition | World position of the hand (its wrist). |
Quaternion interactorRotation | World rotation of the hand. |
bool isForced | Backing field for IsForced. |
bool isForcingHold | Backing field for IsForcingHold. |
Vector3 position | World position of the held entity. |
Quaternion rotation | World rotation of the held entity. |
uint target | Backing field for Target. |
Vector3 velocity | Velocity of the held entity, including the player's movement when built from an Interactor. |
7 private and internal fields
| Member | What it is |
|---|
private static readonly Vector3 AngularVelocityMax | Upper bound used when compressing angular velocity for the network. |
private static readonly Vector3 AngularVelocityMin | Lower bound used when compressing angular velocity for the network. |
private const float AngularVelocityPrecision | Precision (0.001) used when compressing angular velocity. |
private Chunk chunk | Chunk the positions are sent relative to: the held entity's chunk on the server, the local player's chunk on clients. |
private static readonly Vector3 VelocityMax | Upper bound (100 per axis) used when compressing velocity. |
private static readonly Vector3 VelocityMin | Lower bound (-100 per axis) used when compressing velocity. |
private const float VelocityPrecision | Precision (0.001) used when compressing velocity. |
Properties
| Member | What it is |
|---|
bool IsAccessingScore { get; } | Always true, so the receiver checks the grab is valid and logs an error if not. |
bool IsForced { get; } | Whether the interaction was forced. |
bool IsForcingHold { get; } | Whether to force the hold. |
uint Target { get; } | Identifier of the held entity. |
Methods
| Member | What it is |
|---|
void Serialize(IPlayer player, Stream stream) | Writes or reads the target, velocities, poses (relative to a chunk) and flags. |
static void SerializeLinearAngularVelocity(Stream stream, ref Vector3 velocity, ref Vector3 angularVelocity) | Writes or reads a velocity and angular velocity with the same limits. |
Used in
Members of other types that take, return or hold a InteractArguments: