Skip to main content

GrabPointArguments

A struct in Root.Township, the global namespace.

Network argument sent when a hand grabs a pickup. It carries the pickup ID, which grab point was used and its last position, so the other side sets up the same grip.

Constructors​

MemberWhat it is
GrabPointArguments(Pickup pickup, bool isForced = false, bool isForcingHold = false)Creates a GrabPointArguments from pickup, isForced and isForcingHold.

Fields​

7 private and internal fields
MemberWhat it is
private int grabPointIndexIndex of the chosen grab point on the pickup.
private bool isForcedBacking field for IsForced.
private bool isForcingHoldBacking field for IsForcingHold.
private float lastLinearPositionGrab point's last position along its line, 0 to 1.
private Vector3 lastPositionGrab point's last local position.
private Quaternion lastRotationGrab point's last rotation.
private uint targetBacking field for Target.

Properties​

MemberWhat it is
bool IsAccessingScore { get; }Always false.
bool IsForced { get; }Whether the grab is forced; Interactor then skips some local checks.
bool IsForcingHold { get; }Whether the grab must be held regardless of the local grab state.
uint Target { get; }Entity ID of the pickup being grabbed.

Methods​

MemberWhat it is
void ApplyTo(Interactor interactor, Pickup pickup)Restores the saved grab point state on the pickup and sets up that grab point on the interactor.
void Serialize(Stream stream)Writes or reads all fields; grab point index is limited to 0 to 15.

Used in​

Members of other types that take, return or hold a GrabPointArguments: