Forum Discussion
pranav_suresh7
2 years agoProtege
How to know when I grab the object back from SnapInteractable componenent?
Hi, I have created a SnapInteractable gamoebject and for the SnapPoseDelegate(Which helps in placing objects in different/specific positions over a gameobject) I have implemented ISnapPoseDelegate in...
pranav_suresh7
2 years agoProtege
Hi Big_Flex could you please check this out ?
- Big_Flex2 years agoMeta Employee
Hi pranav_suresh7, thanks for tagging me! The delegate is not supposed to be called right after it is placed. Could you share a video of what you're experiencing, including any logs? Could you also share your delegate code here?
To tell if or when the object is currently being grabbed, use an Interactable Group View component and set its Interactables list to all of the grab enable interactables (hand grab, grab or ray).
- pranav_suresh72 years agoProtege
Hi Big_Flex thanks for the reply. this is the issue https://youtu.be/zl_rwHjp-Ew. I got where the issue is coming but I don't know which is the proper way to resolve this. In SnapInteractable-> SelectingInteractorAdded-> SnapElement function I'm marking the added Interactor position in gird as MARKED, in the DoSelectUpdate() function in SnapInteractor which calls the function (Interactable.PoseForInteractor(this, out Pose targetPose)) that calculates the position/pose for this SnapInteractor. So this function Interactable.PoseForInteractor(this, out Pose targetPose) is also called after SnapElement function where I mark the position as MARKED. Since here Interactable.PoseForInteractor(this, out Pose targetPose) if the position SnapInteractor matches this MARKED position it returns FALSE since it was already marked which makes _shouldUnselect to TRUE. I can fix this by adding some conditions but I don't know whether that is the right way. PROBLEM: I have a grid of positions, when I place the gamoebject on to grid positions I have to attach the gameobject to respective positions. If some position is marked as ALREADY ADDED then I shouldn't attacht the gameobject towards that position. Also after it reaches the position it's size have to change accordingly with the position where it's attached.
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
- 1 year ago
- 4 years ago