Tanoda
KinematicGraspedMovement.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
9using System.Collections;
10using System.Collections.Generic;
11using UnityEngine;
12
13namespace Leap.Unity.Interaction {
14
23
24 public void MoveTo(Vector3 solvedPosition, Quaternion solvedRotation,
25 InteractionBehaviour interactionObj, bool justGrasped) {
26 interactionObj.rigidbody.MovePosition(solvedPosition);
27 interactionObj.rigidbody.MoveRotation(solvedRotation);
28
29 // Store the target position and rotation to prevent slippage in SwapGrasp
30 // scenarios.
31 interactionObj.latestScheduledGraspPose = new Pose(solvedPosition, solvedRotation);
32 }
33 }
34}
InteractionBehaviours are components that enable GameObjects to interact with interaction controllers...
Pose? latestScheduledGraspPose
Nonkinematic grasping motion applies clamped velocities to Interaction Behaviours when they are grasp...
Rigidbody rigidbody
The Rigidbody associated with this interaction object.
This implementation of IGraspedMovementHandler moves its interaction object to a target position and ...
void MoveTo(Vector3 solvedPosition, Quaternion solvedRotation, InteractionBehaviour interactionObj, bool justGrasped)
Called by an interaction object when its grasped pose handler has determined a target pose; this meth...
An IGraspedMovementHandler takes in a target position and rotation (a "pose", usually provided by an ...
A position and rotation. You can multiply two poses; this acts like Matrix4x4 multiplication,...
Definition: Pose.cs:21