Skip to content

MRTK Lever Interaction #11175

Answered by Zee2
alanazak8 asked this question in Q&A
Discussion options

You must be logged in to vote

Yep! It probably will require writing a custom interactable. You can try this interactable out for starters; it pivots around the local 0,0,0 of the object, and is constrained to a particular axis. See the issue ticket here where lever-type interactions were discussed: #11186

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
using Microsoft.MixedReality.Toolkit;

/// <summary>
/// Models a lever-like pivot interaction around a specified axis.
/// </summary>
public class PivotInteractable : MRTKBaseInteractable
{
    // Will constrain pivoting to the specified axis.
    // e.g., mode = X => only spin around X axis.
    p…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Zee2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants