Skip to main content

GrabPointParameters

A class in Root.Township, the global namespace.

Which grab point of a pickup a hand holds and where along it, so a grab can be sent over the network and reapplied.

Constructors​

MemberWhat it is
GrabPointParameters()Creates a GrabPointParameters from pickup and grabPoint.
GrabPointParameters(Pickup pickup, GrabPoint grabPoint)Creates a GrabPointParameters from pickup and grabPoint.

Fields​

4 private and internal fields
MemberWhat it is
private int grabPointIndexIndex of the grab point in the pickup's grab point list (0 to 15 when synced).
private float lastLinearPositionThe grab point's last position along its line, 0 to 1.
private Vector3 lastPositionThe grab point's last local position, synced within plus or minus 10 m.
private Quaternion lastRotationThe grab point's last rotation, synced compressed.

Methods​

MemberWhat it is
GrabPoint Applied(Pickup pickup)Writes the stored position and rotation back onto the pickup's grab point and returns it.
GrabPoint GrabPointForPickup(Pickup pickup)Returns the grab point by its stored index.
void Serialize(Stream stream, Pickup pickup)Reads or writes the grab point index (0 to 15), linear position, local position and rotation.

Used in​

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