cancel
Showing results for 
Search instead for 
Did you mean: 

App crashes when grabbing attempt using Interaction SDK

Motanum
Protege

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.


 

1 ACCEPTED SOLUTION

Accepted Solutions

Motanum
Protege

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)]);

 

 

View solution in original post

4 REPLIES 4

j_g_sampson
Honored Guest

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?

MetaQuestSupport
Community Manager
Community Manager

Hey!

 

We see you are having some issues whilst using our developer mode.

 

You may get better assistance through our developers forum here: https://developer.oculus.com/support/

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. 

gabryelx_0-1729807785799.png

 

Motanum
Protege

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)]);