10using System.Collections;
11using System.Collections.Generic;
16 [AddComponentMenu(
"")]
19 protected override void Start() {
27 private void onGraspedMovement(Vector3 presolvePos, Quaternion presolveRot, Vector3 solvedPos, Quaternion solvedRot, List<InteractionController> controllers) {
39 Vector3 presolveToolToHandle = presolvePos -
_tool.transform.position;
40 Vector3 solvedToolToHandleDirection = (solvedPos -
_tool.transform.position).normalized;
41 Vector3 constrainedToolToHandle = Vector3.ProjectOnPlane(solvedToolToHandleDirection, (presolveRot * Vector3.up)).normalized * presolveToolToHandle.magnitude;
42 Quaternion deltaRotation = Quaternion.FromToRotation(presolveToolToHandle, constrainedToolToHandle);
Rigidbody rigidbody
The Rigidbody associated with this interaction object.
GraspedMovementEvent OnGraspedMovement
Called directly after this grasped object's Rigidbody has had its position and rotation set by its cu...