Moving and scaling an object according to hand position












0















I need some help with my college project. I have a cylinder and need it to act as a coil. For example, if I touched the cylinder's surface it's height will decrease (scaled in the y direction) as if pressing on a coil then when I remove my hand it returns back to its original size.

This is what I reached till now but I still have some problems that I can't solve.



public class Deformation : MonoBehaviour
{

Vector3 tempPos;

private void InteractionManager_SourceUpdated(InteractionSourceUpdatedEventArgs hand)
{
if (hand.state.source.kind == InteractionSourceKind.Hand)
{
Vector3 handPosition;
hand.state.sourcePose.TryGetPosition(out handPosition);

float negXRange = transform.position.x - transform.localScale.x;
float posXRange = transform.position.x + transform.localScale.x;
float negYRange = transform.position.y - (transform.localScale.y / 2);
float posYRange = transform.position.y + (transform.localScale.y / 2);
float negZRange = transform.position.z - transform.localScale.z;
float posZRange = transform.position.z + transform.localScale.z;

float handX = handPosition.x;
float handY = handPosition.y;
float handZ = handPosition.z;

if ((negXRange <= handX) && (handX <= posXRange) && (negYRange <= handY) && (handY <= posYRange) && (negZRange <= handZ) && (handZ <= posZRange))
{
tempPos.y = handPosition.y;
transform.localScale = tempPos;
}
else
{
tempPos.y = 0.3f;
transform.localScale = tempPos;
}
}
}

// Use this for initialization
void Start()
{
tempPos = transform.localScale;

InteractionManager.InteractionSourceUpdated += InteractionManager_SourceUpdated;
}



  1. I attached two scripts to my object (cylinder) the TapToPlace script from the HoloToolKit and the deformation script stated above. The problem is when I deploy to my HoloLens to test, when I place the cylinder first to the needed place then try to deform it after that, it is placed but not deformed. If I tried it the other way around both work. Any ideas why does the deformation script does not work after the TapToPlace one?

  2. The cylinder when viewed by my HoloLens is somehow transparent. I mean that I can see my hand through it. I need it to be more solid.

  3. I wonder if there is something like a delay that I can use because when I use the deformation script stated above the cylinder is scaled to my hand position then scaled back to its default size very fast and appears as if blinking.


  4. At first I place the cylinder on a setup (something as a table for example) then I begin to deform it. When I commented the else part in the deformation script stated above, it was scaled and left stable without returning to the original size. It is scaled symmetrically so its height is decreased from up and down resulting in the base of the cylinder becomes away from the table. I need the base of the cylinder to be always stable and touching the table under it.



    Note: I am using Unity 2017.3.1f1 (64-bit) - HoloToolkit-Unity-2017.2.1.3



    Thank you in advance.












share|improve this question





























    0















    I need some help with my college project. I have a cylinder and need it to act as a coil. For example, if I touched the cylinder's surface it's height will decrease (scaled in the y direction) as if pressing on a coil then when I remove my hand it returns back to its original size.

    This is what I reached till now but I still have some problems that I can't solve.



    public class Deformation : MonoBehaviour
    {

    Vector3 tempPos;

    private void InteractionManager_SourceUpdated(InteractionSourceUpdatedEventArgs hand)
    {
    if (hand.state.source.kind == InteractionSourceKind.Hand)
    {
    Vector3 handPosition;
    hand.state.sourcePose.TryGetPosition(out handPosition);

    float negXRange = transform.position.x - transform.localScale.x;
    float posXRange = transform.position.x + transform.localScale.x;
    float negYRange = transform.position.y - (transform.localScale.y / 2);
    float posYRange = transform.position.y + (transform.localScale.y / 2);
    float negZRange = transform.position.z - transform.localScale.z;
    float posZRange = transform.position.z + transform.localScale.z;

    float handX = handPosition.x;
    float handY = handPosition.y;
    float handZ = handPosition.z;

    if ((negXRange <= handX) && (handX <= posXRange) && (negYRange <= handY) && (handY <= posYRange) && (negZRange <= handZ) && (handZ <= posZRange))
    {
    tempPos.y = handPosition.y;
    transform.localScale = tempPos;
    }
    else
    {
    tempPos.y = 0.3f;
    transform.localScale = tempPos;
    }
    }
    }

    // Use this for initialization
    void Start()
    {
    tempPos = transform.localScale;

    InteractionManager.InteractionSourceUpdated += InteractionManager_SourceUpdated;
    }



    1. I attached two scripts to my object (cylinder) the TapToPlace script from the HoloToolKit and the deformation script stated above. The problem is when I deploy to my HoloLens to test, when I place the cylinder first to the needed place then try to deform it after that, it is placed but not deformed. If I tried it the other way around both work. Any ideas why does the deformation script does not work after the TapToPlace one?

    2. The cylinder when viewed by my HoloLens is somehow transparent. I mean that I can see my hand through it. I need it to be more solid.

    3. I wonder if there is something like a delay that I can use because when I use the deformation script stated above the cylinder is scaled to my hand position then scaled back to its default size very fast and appears as if blinking.


    4. At first I place the cylinder on a setup (something as a table for example) then I begin to deform it. When I commented the else part in the deformation script stated above, it was scaled and left stable without returning to the original size. It is scaled symmetrically so its height is decreased from up and down resulting in the base of the cylinder becomes away from the table. I need the base of the cylinder to be always stable and touching the table under it.



      Note: I am using Unity 2017.3.1f1 (64-bit) - HoloToolkit-Unity-2017.2.1.3



      Thank you in advance.












    share|improve this question



























      0












      0








      0








      I need some help with my college project. I have a cylinder and need it to act as a coil. For example, if I touched the cylinder's surface it's height will decrease (scaled in the y direction) as if pressing on a coil then when I remove my hand it returns back to its original size.

      This is what I reached till now but I still have some problems that I can't solve.



      public class Deformation : MonoBehaviour
      {

      Vector3 tempPos;

      private void InteractionManager_SourceUpdated(InteractionSourceUpdatedEventArgs hand)
      {
      if (hand.state.source.kind == InteractionSourceKind.Hand)
      {
      Vector3 handPosition;
      hand.state.sourcePose.TryGetPosition(out handPosition);

      float negXRange = transform.position.x - transform.localScale.x;
      float posXRange = transform.position.x + transform.localScale.x;
      float negYRange = transform.position.y - (transform.localScale.y / 2);
      float posYRange = transform.position.y + (transform.localScale.y / 2);
      float negZRange = transform.position.z - transform.localScale.z;
      float posZRange = transform.position.z + transform.localScale.z;

      float handX = handPosition.x;
      float handY = handPosition.y;
      float handZ = handPosition.z;

      if ((negXRange <= handX) && (handX <= posXRange) && (negYRange <= handY) && (handY <= posYRange) && (negZRange <= handZ) && (handZ <= posZRange))
      {
      tempPos.y = handPosition.y;
      transform.localScale = tempPos;
      }
      else
      {
      tempPos.y = 0.3f;
      transform.localScale = tempPos;
      }
      }
      }

      // Use this for initialization
      void Start()
      {
      tempPos = transform.localScale;

      InteractionManager.InteractionSourceUpdated += InteractionManager_SourceUpdated;
      }



      1. I attached two scripts to my object (cylinder) the TapToPlace script from the HoloToolKit and the deformation script stated above. The problem is when I deploy to my HoloLens to test, when I place the cylinder first to the needed place then try to deform it after that, it is placed but not deformed. If I tried it the other way around both work. Any ideas why does the deformation script does not work after the TapToPlace one?

      2. The cylinder when viewed by my HoloLens is somehow transparent. I mean that I can see my hand through it. I need it to be more solid.

      3. I wonder if there is something like a delay that I can use because when I use the deformation script stated above the cylinder is scaled to my hand position then scaled back to its default size very fast and appears as if blinking.


      4. At first I place the cylinder on a setup (something as a table for example) then I begin to deform it. When I commented the else part in the deformation script stated above, it was scaled and left stable without returning to the original size. It is scaled symmetrically so its height is decreased from up and down resulting in the base of the cylinder becomes away from the table. I need the base of the cylinder to be always stable and touching the table under it.



        Note: I am using Unity 2017.3.1f1 (64-bit) - HoloToolkit-Unity-2017.2.1.3



        Thank you in advance.












      share|improve this question
















      I need some help with my college project. I have a cylinder and need it to act as a coil. For example, if I touched the cylinder's surface it's height will decrease (scaled in the y direction) as if pressing on a coil then when I remove my hand it returns back to its original size.

      This is what I reached till now but I still have some problems that I can't solve.



      public class Deformation : MonoBehaviour
      {

      Vector3 tempPos;

      private void InteractionManager_SourceUpdated(InteractionSourceUpdatedEventArgs hand)
      {
      if (hand.state.source.kind == InteractionSourceKind.Hand)
      {
      Vector3 handPosition;
      hand.state.sourcePose.TryGetPosition(out handPosition);

      float negXRange = transform.position.x - transform.localScale.x;
      float posXRange = transform.position.x + transform.localScale.x;
      float negYRange = transform.position.y - (transform.localScale.y / 2);
      float posYRange = transform.position.y + (transform.localScale.y / 2);
      float negZRange = transform.position.z - transform.localScale.z;
      float posZRange = transform.position.z + transform.localScale.z;

      float handX = handPosition.x;
      float handY = handPosition.y;
      float handZ = handPosition.z;

      if ((negXRange <= handX) && (handX <= posXRange) && (negYRange <= handY) && (handY <= posYRange) && (negZRange <= handZ) && (handZ <= posZRange))
      {
      tempPos.y = handPosition.y;
      transform.localScale = tempPos;
      }
      else
      {
      tempPos.y = 0.3f;
      transform.localScale = tempPos;
      }
      }
      }

      // Use this for initialization
      void Start()
      {
      tempPos = transform.localScale;

      InteractionManager.InteractionSourceUpdated += InteractionManager_SourceUpdated;
      }



      1. I attached two scripts to my object (cylinder) the TapToPlace script from the HoloToolKit and the deformation script stated above. The problem is when I deploy to my HoloLens to test, when I place the cylinder first to the needed place then try to deform it after that, it is placed but not deformed. If I tried it the other way around both work. Any ideas why does the deformation script does not work after the TapToPlace one?

      2. The cylinder when viewed by my HoloLens is somehow transparent. I mean that I can see my hand through it. I need it to be more solid.

      3. I wonder if there is something like a delay that I can use because when I use the deformation script stated above the cylinder is scaled to my hand position then scaled back to its default size very fast and appears as if blinking.


      4. At first I place the cylinder on a setup (something as a table for example) then I begin to deform it. When I commented the else part in the deformation script stated above, it was scaled and left stable without returning to the original size. It is scaled symmetrically so its height is decreased from up and down resulting in the base of the cylinder becomes away from the table. I need the base of the cylinder to be always stable and touching the table under it.



        Note: I am using Unity 2017.3.1f1 (64-bit) - HoloToolkit-Unity-2017.2.1.3



        Thank you in advance.









      c# unity3d hololens mrtk






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 19 at 20:36









      nneonneo

      127k27196299




      127k27196299










      asked Apr 20 '18 at 9:15









      Nour NabhanNour Nabhan

      12




      12
























          1 Answer
          1






          active

          oldest

          votes


















          0














          1) Did you see the MRTK 2017.2.1.4 release? It has some useful features such as two handed resizing/scaling of objects. The BoundingBox code in the new MRTK release does moving and resizing in one component, it might be a better base to start from than the TapToPlace, or at least show how the two types of transform can work together.



          2) What colour is your object? Hololens will render black as transparent, so try making the object bright white for testing. Also, just double check the brightness is turned up to full (the LHS buttons on the hololens). Finally, check your shader is the MRTK Standard shader. (again, the 2017.2.1.4 release has new shader code you might want to try.) . In a room without direct sunlight it should pretty much cover up your hand.



          4) I'm not sure I follow completely, but the pivot point could be important here. If it is centred in the middle of the coil (as I'd imagine it is) then when you deform the coil down it will still stay centered at that central pivot point.
          If you instead set the pivot point to the bottom of the coil, touching the table, you can scale and that point stays on the table and the top does all the moving.






          share|improve this answer
























          • 1. I didn't know about MRTK 2017.2.1.4 just got it now. I will try it. Can you please clarify how can the BoundingBox code replace the TapToPlace one? I tried to find documentation for it but couldn't find anything.

            – Nour Nabhan
            Apr 21 '18 at 10:11













          • 1. Do you mean by two handed resizing/scaling of objects that they are scaled by hand manipulation of the objects using hand gestures? What i need is the object to be auto scaled to my hand position when detected.

            – Nour Nabhan
            Apr 21 '18 at 10:18













          • 2. My object is green with components --> R: 0, G: 255, B: 0, A: 255. I checked the brightness and it is turned up to full. I am using the standard shader but I can't find a standard one in the MRTK. Any help where to find it?

            – Nour Nabhan
            Apr 21 '18 at 10:22











          • 4. Yes the pivot is centered. Can you please give me a hint on how to set the pivot point to the bottom of the coil? Please excuse my silly questions as I am new to HoloLens developing and don't know really much. Thank you.

            – Nour Nabhan
            Apr 21 '18 at 10:26











          • 1. It doesn't tap to place in the same way, but is more a dragging around thing. I mean it could be useful as an example of something which can both scale and move objects, as 1 seemed to be about the two types of transform not working well together. You'd need a seperate specific question to address specific problems with putting that code together.

            – Jethro
            Apr 21 '18 at 14:02











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49938163%2fmoving-and-scaling-an-object-according-to-hand-position%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          1) Did you see the MRTK 2017.2.1.4 release? It has some useful features such as two handed resizing/scaling of objects. The BoundingBox code in the new MRTK release does moving and resizing in one component, it might be a better base to start from than the TapToPlace, or at least show how the two types of transform can work together.



          2) What colour is your object? Hololens will render black as transparent, so try making the object bright white for testing. Also, just double check the brightness is turned up to full (the LHS buttons on the hololens). Finally, check your shader is the MRTK Standard shader. (again, the 2017.2.1.4 release has new shader code you might want to try.) . In a room without direct sunlight it should pretty much cover up your hand.



          4) I'm not sure I follow completely, but the pivot point could be important here. If it is centred in the middle of the coil (as I'd imagine it is) then when you deform the coil down it will still stay centered at that central pivot point.
          If you instead set the pivot point to the bottom of the coil, touching the table, you can scale and that point stays on the table and the top does all the moving.






          share|improve this answer
























          • 1. I didn't know about MRTK 2017.2.1.4 just got it now. I will try it. Can you please clarify how can the BoundingBox code replace the TapToPlace one? I tried to find documentation for it but couldn't find anything.

            – Nour Nabhan
            Apr 21 '18 at 10:11













          • 1. Do you mean by two handed resizing/scaling of objects that they are scaled by hand manipulation of the objects using hand gestures? What i need is the object to be auto scaled to my hand position when detected.

            – Nour Nabhan
            Apr 21 '18 at 10:18













          • 2. My object is green with components --> R: 0, G: 255, B: 0, A: 255. I checked the brightness and it is turned up to full. I am using the standard shader but I can't find a standard one in the MRTK. Any help where to find it?

            – Nour Nabhan
            Apr 21 '18 at 10:22











          • 4. Yes the pivot is centered. Can you please give me a hint on how to set the pivot point to the bottom of the coil? Please excuse my silly questions as I am new to HoloLens developing and don't know really much. Thank you.

            – Nour Nabhan
            Apr 21 '18 at 10:26











          • 1. It doesn't tap to place in the same way, but is more a dragging around thing. I mean it could be useful as an example of something which can both scale and move objects, as 1 seemed to be about the two types of transform not working well together. You'd need a seperate specific question to address specific problems with putting that code together.

            – Jethro
            Apr 21 '18 at 14:02
















          0














          1) Did you see the MRTK 2017.2.1.4 release? It has some useful features such as two handed resizing/scaling of objects. The BoundingBox code in the new MRTK release does moving and resizing in one component, it might be a better base to start from than the TapToPlace, or at least show how the two types of transform can work together.



          2) What colour is your object? Hololens will render black as transparent, so try making the object bright white for testing. Also, just double check the brightness is turned up to full (the LHS buttons on the hololens). Finally, check your shader is the MRTK Standard shader. (again, the 2017.2.1.4 release has new shader code you might want to try.) . In a room without direct sunlight it should pretty much cover up your hand.



          4) I'm not sure I follow completely, but the pivot point could be important here. If it is centred in the middle of the coil (as I'd imagine it is) then when you deform the coil down it will still stay centered at that central pivot point.
          If you instead set the pivot point to the bottom of the coil, touching the table, you can scale and that point stays on the table and the top does all the moving.






          share|improve this answer
























          • 1. I didn't know about MRTK 2017.2.1.4 just got it now. I will try it. Can you please clarify how can the BoundingBox code replace the TapToPlace one? I tried to find documentation for it but couldn't find anything.

            – Nour Nabhan
            Apr 21 '18 at 10:11













          • 1. Do you mean by two handed resizing/scaling of objects that they are scaled by hand manipulation of the objects using hand gestures? What i need is the object to be auto scaled to my hand position when detected.

            – Nour Nabhan
            Apr 21 '18 at 10:18













          • 2. My object is green with components --> R: 0, G: 255, B: 0, A: 255. I checked the brightness and it is turned up to full. I am using the standard shader but I can't find a standard one in the MRTK. Any help where to find it?

            – Nour Nabhan
            Apr 21 '18 at 10:22











          • 4. Yes the pivot is centered. Can you please give me a hint on how to set the pivot point to the bottom of the coil? Please excuse my silly questions as I am new to HoloLens developing and don't know really much. Thank you.

            – Nour Nabhan
            Apr 21 '18 at 10:26











          • 1. It doesn't tap to place in the same way, but is more a dragging around thing. I mean it could be useful as an example of something which can both scale and move objects, as 1 seemed to be about the two types of transform not working well together. You'd need a seperate specific question to address specific problems with putting that code together.

            – Jethro
            Apr 21 '18 at 14:02














          0












          0








          0







          1) Did you see the MRTK 2017.2.1.4 release? It has some useful features such as two handed resizing/scaling of objects. The BoundingBox code in the new MRTK release does moving and resizing in one component, it might be a better base to start from than the TapToPlace, or at least show how the two types of transform can work together.



          2) What colour is your object? Hololens will render black as transparent, so try making the object bright white for testing. Also, just double check the brightness is turned up to full (the LHS buttons on the hololens). Finally, check your shader is the MRTK Standard shader. (again, the 2017.2.1.4 release has new shader code you might want to try.) . In a room without direct sunlight it should pretty much cover up your hand.



          4) I'm not sure I follow completely, but the pivot point could be important here. If it is centred in the middle of the coil (as I'd imagine it is) then when you deform the coil down it will still stay centered at that central pivot point.
          If you instead set the pivot point to the bottom of the coil, touching the table, you can scale and that point stays on the table and the top does all the moving.






          share|improve this answer













          1) Did you see the MRTK 2017.2.1.4 release? It has some useful features such as two handed resizing/scaling of objects. The BoundingBox code in the new MRTK release does moving and resizing in one component, it might be a better base to start from than the TapToPlace, or at least show how the two types of transform can work together.



          2) What colour is your object? Hololens will render black as transparent, so try making the object bright white for testing. Also, just double check the brightness is turned up to full (the LHS buttons on the hololens). Finally, check your shader is the MRTK Standard shader. (again, the 2017.2.1.4 release has new shader code you might want to try.) . In a room without direct sunlight it should pretty much cover up your hand.



          4) I'm not sure I follow completely, but the pivot point could be important here. If it is centred in the middle of the coil (as I'd imagine it is) then when you deform the coil down it will still stay centered at that central pivot point.
          If you instead set the pivot point to the bottom of the coil, touching the table, you can scale and that point stays on the table and the top does all the moving.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Apr 20 '18 at 13:57









          JethroJethro

          5761722




          5761722













          • 1. I didn't know about MRTK 2017.2.1.4 just got it now. I will try it. Can you please clarify how can the BoundingBox code replace the TapToPlace one? I tried to find documentation for it but couldn't find anything.

            – Nour Nabhan
            Apr 21 '18 at 10:11













          • 1. Do you mean by two handed resizing/scaling of objects that they are scaled by hand manipulation of the objects using hand gestures? What i need is the object to be auto scaled to my hand position when detected.

            – Nour Nabhan
            Apr 21 '18 at 10:18













          • 2. My object is green with components --> R: 0, G: 255, B: 0, A: 255. I checked the brightness and it is turned up to full. I am using the standard shader but I can't find a standard one in the MRTK. Any help where to find it?

            – Nour Nabhan
            Apr 21 '18 at 10:22











          • 4. Yes the pivot is centered. Can you please give me a hint on how to set the pivot point to the bottom of the coil? Please excuse my silly questions as I am new to HoloLens developing and don't know really much. Thank you.

            – Nour Nabhan
            Apr 21 '18 at 10:26











          • 1. It doesn't tap to place in the same way, but is more a dragging around thing. I mean it could be useful as an example of something which can both scale and move objects, as 1 seemed to be about the two types of transform not working well together. You'd need a seperate specific question to address specific problems with putting that code together.

            – Jethro
            Apr 21 '18 at 14:02



















          • 1. I didn't know about MRTK 2017.2.1.4 just got it now. I will try it. Can you please clarify how can the BoundingBox code replace the TapToPlace one? I tried to find documentation for it but couldn't find anything.

            – Nour Nabhan
            Apr 21 '18 at 10:11













          • 1. Do you mean by two handed resizing/scaling of objects that they are scaled by hand manipulation of the objects using hand gestures? What i need is the object to be auto scaled to my hand position when detected.

            – Nour Nabhan
            Apr 21 '18 at 10:18













          • 2. My object is green with components --> R: 0, G: 255, B: 0, A: 255. I checked the brightness and it is turned up to full. I am using the standard shader but I can't find a standard one in the MRTK. Any help where to find it?

            – Nour Nabhan
            Apr 21 '18 at 10:22











          • 4. Yes the pivot is centered. Can you please give me a hint on how to set the pivot point to the bottom of the coil? Please excuse my silly questions as I am new to HoloLens developing and don't know really much. Thank you.

            – Nour Nabhan
            Apr 21 '18 at 10:26











          • 1. It doesn't tap to place in the same way, but is more a dragging around thing. I mean it could be useful as an example of something which can both scale and move objects, as 1 seemed to be about the two types of transform not working well together. You'd need a seperate specific question to address specific problems with putting that code together.

            – Jethro
            Apr 21 '18 at 14:02

















          1. I didn't know about MRTK 2017.2.1.4 just got it now. I will try it. Can you please clarify how can the BoundingBox code replace the TapToPlace one? I tried to find documentation for it but couldn't find anything.

          – Nour Nabhan
          Apr 21 '18 at 10:11







          1. I didn't know about MRTK 2017.2.1.4 just got it now. I will try it. Can you please clarify how can the BoundingBox code replace the TapToPlace one? I tried to find documentation for it but couldn't find anything.

          – Nour Nabhan
          Apr 21 '18 at 10:11















          1. Do you mean by two handed resizing/scaling of objects that they are scaled by hand manipulation of the objects using hand gestures? What i need is the object to be auto scaled to my hand position when detected.

          – Nour Nabhan
          Apr 21 '18 at 10:18







          1. Do you mean by two handed resizing/scaling of objects that they are scaled by hand manipulation of the objects using hand gestures? What i need is the object to be auto scaled to my hand position when detected.

          – Nour Nabhan
          Apr 21 '18 at 10:18















          2. My object is green with components --> R: 0, G: 255, B: 0, A: 255. I checked the brightness and it is turned up to full. I am using the standard shader but I can't find a standard one in the MRTK. Any help where to find it?

          – Nour Nabhan
          Apr 21 '18 at 10:22





          2. My object is green with components --> R: 0, G: 255, B: 0, A: 255. I checked the brightness and it is turned up to full. I am using the standard shader but I can't find a standard one in the MRTK. Any help where to find it?

          – Nour Nabhan
          Apr 21 '18 at 10:22













          4. Yes the pivot is centered. Can you please give me a hint on how to set the pivot point to the bottom of the coil? Please excuse my silly questions as I am new to HoloLens developing and don't know really much. Thank you.

          – Nour Nabhan
          Apr 21 '18 at 10:26





          4. Yes the pivot is centered. Can you please give me a hint on how to set the pivot point to the bottom of the coil? Please excuse my silly questions as I am new to HoloLens developing and don't know really much. Thank you.

          – Nour Nabhan
          Apr 21 '18 at 10:26













          1. It doesn't tap to place in the same way, but is more a dragging around thing. I mean it could be useful as an example of something which can both scale and move objects, as 1 seemed to be about the two types of transform not working well together. You'd need a seperate specific question to address specific problems with putting that code together.

          – Jethro
          Apr 21 '18 at 14:02





          1. It doesn't tap to place in the same way, but is more a dragging around thing. I mean it could be useful as an example of something which can both scale and move objects, as 1 seemed to be about the two types of transform not working well together. You'd need a seperate specific question to address specific problems with putting that code together.

          – Jethro
          Apr 21 '18 at 14:02


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49938163%2fmoving-and-scaling-an-object-according-to-hand-position%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Callistus III

          Ostreoida

          Plistias Cous