GrabAssistView
A class in Root.Township, the global namespace.
Client: draws the grab assist path and target marker for one hand, using meshes and materials from GrabAssistSettings. Created with a GrabAssistController and hooked to its events.
- Listed in Global namespace: E to H
Constructors
| Member | What it is |
|---|---|
GrabAssistView(GrabAssistController controller, bool isRightHand) | Creates a GrabAssistView from controller and isRightHand. |
Fields
9 private and internal fields
Properties
2 private and internal properties
| Member | What it is |
|---|---|
private static Camera Camera { get; } | The local player's camera, which the indicators are drawn for. |
private static GrabAssistSettings Settings { get; } | The global GrabAssistSettings. |
Methods
| Member | What it is |
|---|---|
void Disable(GrabAssistController controller) | Unhooks from the controller's events and destroys the material copies. |
void Enable(GrabAssistController controller) | Hooks the controller's grab assist started, ended and updated events. |
7 private and internal methods
| Member | What it is |
|---|---|
private Vector3 GetLerpedPosition(Vector3 origin, Vector3 midPoint, float linePoint, Vector3 pointPosition) | Gives a path point on a curve to the last end point, smoothed, used when no target is found. |
private static Vector3 GetSectionPoint(Vector3 start, Vector3 end, float t) | Point a fraction of the way from start to end. |
private void IndicatePath(GrabAssistEventData data) | Draws the dotted path from origin to target, coloured by whether a target was found. |
private void IndicateTarget(GrabAssistEventData data) | Draws the target marker facing the camera, scaled by distance, with a found or not found material. |
private void OnEndGrabAssist() | Empty. |
private void OnStartGrabAssist() | Resets the last path end point. |
private void OnUpdateGrabAssist(GrabAssistEventData data) | Draws the path and target for this frame. |
Used in
Members of other types that take, return or hold a GrabAssistView: