Skip to content

Commit

Permalink
Full_Added
Browse files Browse the repository at this point in the history
  • Loading branch information
Youshaa Murhij committed Apr 11, 2020
1 parent 4863c70 commit c1fd55e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion KR10 - 1.5f1 - Hand Tracking/Assets/Scripts/MainCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class MainCode : MonoBehaviour {
public bool HandBOOL = true;
public bool BO2 = true;
void Start () {
//================================RoboDK Code==============================================
RoboDK RDK = new RoboDK();
Variables.ROBOT = RDK.ItemUserPick("Select a robot", RoboDK.ITEM_TYPE_ROBOT);
if (Variables.ROBOT.Connect())
Expand Down Expand Up @@ -62,6 +63,7 @@ void Update () {
Y = hand.PalmPosition.x;
Z = hand.PalmPosition.y;
}
//Vector3 handPosition = hand.PalmPosition.ToVector3();
if (LeapBOOL)
{
x = Variables.xyz_ref[0] + X * Factor_LM;
Expand Down Expand Up @@ -108,4 +110,4 @@ void Update () {
// LeapBOOL = false;
// }
//}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@ public class Position_Script : MonoBehaviour
{
public static Vector3 v;
Vector3 v0;
//// Start is called before the first frame update
void awake()
{
v0 = VivePose.GetPoseEx(HandRole.RightHand).pos; // last known position of left controller
}
// Update is called once per frame
void Update()
{
RigidPose pose = VivePose.GetPoseEx(HandRole.RightHand);
Expand All @@ -29,6 +31,7 @@ void Update()
{
v = pose.pos-v0 ;
}
//print(v);

}
}

0 comments on commit c1fd55e

Please sign in to comment.