10-24-2024 11:44 AM
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.
Solved! Go to Solution.
10-25-2024 02:39 PM - edited 10-25-2024 02:42 PM
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)]);
10-24-2024 01:18 PM - edited 10-24-2024 01:20 PM
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?
10-24-2024 01:40 PM
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/
10-24-2024 03:10 PM
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.
10-25-2024 02:39 PM - edited 10-25-2024 02:42 PM
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)]);