Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm working with A-Frame, A-Frame Physics, and Super Hands. I have a simple scene where I can place an object (just a-box for now) and some controllers. When I view this scene in VR I can grab the box, move it around, and resize it, but I cannot rotate or spin the object.

I want the rotation to match the rotation of the hand that is holding the object. So if I grab an object with my right hand, then turn that hand, the object should rotate the same amount.

<a-scene
      style="height: calc(100vh - 5rem)"
      embedded
      physics="debug: true; gravity: 0;"
    >
      <a-entity>
        <a-camera></a-camera>
        <a-entity
          sphere-collider="objects: a-box"
          super-hands
          hand-controls="hand: left"
        ></a-entity>
        <a-entity
          sphere-collider="objects: a-box"
          super-hands
          hand-controls="hand: right"
        ></a-entity>
      </a-entity>

      <a-box
        color="blue"
        position="0 1.4 -1"
        depth="0.1"
        height="0.8"
        width="1"
        grabbable
        stretchable
        draggable
        dynamic-body
      >
      </a-box>
    </a-scene>```

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
980 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...