Forum Discussion
Motanum
1 year agoStart Member
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
- j_g_sampsonMeta Employee
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?
- gabryelxHonored 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.
- MetaStoreHelpCommunity 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/
- MotanumStart 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)]);
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago