16 [AddComponentMenu(
"")]
23 private bool _swapScheduled =
false;
36 private void scheduleSwap() {
37 _swapScheduled =
true;
40 private void onPostPhysics() {
58 var bPose =
new Pose(b.rigidbody.position, b.rigidbody.rotation);
59 var bVel = b.rigidbody.velocity;
60 var bAngVel = b.rigidbody.angularVelocity;
67 if (a.latestScheduledGraspPose.HasValue) {
68 b.rigidbody.position = a.latestScheduledGraspPose.Value.position;
69 b.rigidbody.rotation = a.latestScheduledGraspPose.Value.rotation;
72 b.rigidbody.position = a.rigidbody.position;
73 b.rigidbody.rotation = a.rigidbody.rotation;
77 a.graspingController.SwapGrasp(b);
80 a.rigidbody.position = bPose.position;
81 a.rigidbody.rotation = bPose.rotation;
82 a.rigidbody.velocity = bVel;
83 a.rigidbody.angularVelocity = bAngVel;
86 _swapScheduled =
false;
InteractionButton swapButton
InteractionBehaviours are components that enable GameObjects to interact with interaction controllers...
bool isGrasped
Gets whether this object is grasped by any interaction controller.
static Action OnPostPhysics
InteractionBehaviour IntObj