Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Motanum's avatar
Motanum
Start Member
1 year ago
Solved

App crashes when grabbing attempt using Interaction SDK

I'm using Meta's fork of Unreal Engine 4.5.3 and I am using Interaction SDK.

I tried to set up an actor to be grabbed, using the InteractionSDK, but whenever I pinch my object, the app crashes.

The documentation is very vague on how to set it up, and I tried to copy the Hierarchy from the sample project, but I don't know what is causing the crash. I'm testing in a packaged app on my Quest Pro. The sample project does work as intended.

I just added a BoxCollision to the actor IsdkInteractableWidget, and as a child to the BoxCollision, I added IsdkGrabbable component. As well as a IsdkGrabbableAudio.

The widget does work with hand to poke and do raytrace interactions, so I am confident in the IsdkHandRigComponentRight and Left components.


 

  • I found the issue.

    Having exactly one sound for Grab or Release in IsdkGrabbableAudio will cause an Out Of Index array crash.

    For now, be sure to have either No sounds in those arrays, or 2 or more sounds (Even if it's the same SoundWave twice).

    To fix the code from your plugin go to MetaXRInteraction\Source\OculusInteraction\Public\Interaction\IsdkGrabbableAudio.h

    Go to line 75 and line 90 (Roughly). And change the lines
    > GrabbingSounds[FMath::Rand() % (GrabbingSounds.Num() - 1)]);
    Into
    > GrabbingSounds[FMath::RandRange(0, ReleasingSounds.Num() - 1)]);

    And the same for ReleaseSounds
    > ReleasingSounds[FMath::Rand() % (ReleasingSounds.Num() - 1)]);
    Into
    > ReleasingSounds[FMath::RandRange(0, ReleasingSounds.Num() - 1)]);

     

     

4 Replies

Replies have been turned off for this discussion
  • Looking at the screenshot, my guess is that the parent object (Box) does not have a static mesh that the Grabber can derive a collider from, as it's a widget. The crash is undesirable, though. Can you provide a log that contains the crash?

    • gabryelx's avatar
      gabryelx
      Honored Guest

      Hi John, 

        Just to follow through, only static mesh objects can be grabbed with Unreal ISDK?  I was having some issues I think because the tutorial documentation implies otherwise. 

       

  • Motanum's avatar
    Motanum
    Start Member

    I found the issue.

    Having exactly one sound for Grab or Release in IsdkGrabbableAudio will cause an Out Of Index array crash.

    For now, be sure to have either No sounds in those arrays, or 2 or more sounds (Even if it's the same SoundWave twice).

    To fix the code from your plugin go to MetaXRInteraction\Source\OculusInteraction\Public\Interaction\IsdkGrabbableAudio.h

    Go to line 75 and line 90 (Roughly). And change the lines
    > GrabbingSounds[FMath::Rand() % (GrabbingSounds.Num() - 1)]);
    Into
    > GrabbingSounds[FMath::RandRange(0, ReleasingSounds.Num() - 1)]);

    And the same for ReleaseSounds
    > ReleasingSounds[FMath::Rand() % (ReleasingSounds.Num() - 1)]);
    Into
    > ReleasingSounds[FMath::RandRange(0, ReleasingSounds.Num() - 1)]);