Activate Lever using XR Simple Interactor or XR Lever
<p>I’ve previously used Levers to activate events using the XR Lever script. In this article, I want to demonstrate how I used an animator with the trigger to activate a lever using the <strong>XR Simple Interactor.</strong></p>
<p>First, I’ve created my <strong>animation </strong>for my lever to go up and down with the use of the <strong>Trigger parameter</strong>.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:586/1*UEKGLOtoz8NGqiuN7Yh-UA.png" style="height:475px; width:586px" /></p>
<p>I used the <strong>condition </strong>for both of these transitions to be the <strong>trigger </strong>“LeverOn.”</p>
<p>Then, on my Lever, I placed a <strong>sphere collider</strong>, a <strong>rigidbody </strong>with kinematic on, and a <strong>Simple Interactor</strong>. Within the “<strong>Select</strong>” field, I want to drag the actual object called Lever1 onto this field, and then I will be able to see the drop down menu for <strong>Animator </strong>→ <strong>SetTrigger</strong>(string). Then simply type in the name of the <strong>Trigger parameter </strong>used above for the <strong>animation</strong>.</p>
<p><a href="https://medium.com/@eveciana21/activate-lever-using-xr-simple-interactor-or-xr-lever-acf961f754d7"><strong>Website</strong></a></p>