Grabbing a Handle in XR
<p>In this article, I will discuss grabbing a handle so we can pull open a drawer so we can grab a key that is hidden inside.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:770/1*tJeb6UisuC6qJvTWgTHp0w.png" style="height:533px; width:700px" /></p>
<p>To do this, we will be using a <strong>configurable joint</strong> with the drawer. Joints are used to attach different gameobjects in the physics system and constrain them in different ways. <strong>Configurable joints</strong> essentially combine all of the joints into one configurable joint.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:426/1*ZC72Lg89rOVAdYZrvsTTPw.png" style="height:790px; width:387px" /></p>
<p>You will notice that the <strong>X and Y motion</strong> is <strong>locked </strong>and the<strong> Z motion</strong> is <strong>limited</strong>. This is so that we can open the drawer in only one direction and only up to a certain point.</p>
<p>The limit is configured within the <strong>Linear Limit</strong> settings.</p>
<p><a href="https://medium.com/@eveciana21/grabbing-a-handle-in-xr-9b4d2039c1d4"><strong>Click Here</strong></a></p>