Forum Discussion
Zsaberhd
9 months agoExplorer
Avatars as discovery
Hi everyone,
I would like to create a system to integrate avatars as meta uses it for his colocation example
(here is the link: https://github.com/oculus-samples/Unity-Discover)
Quick explanation of my goal, at the moment I can figure out if a user joins my room with the result of OVRColocationSession.StartDiscoveryAsync():
-successful: gets alignment and should not see the avatar of other users in the colocation
-failed: should spawn an avatar to all other users and should see the avatars of all others (including those in colocation)
any advice?
6 Replies
Replies have been turned off for this discussion
- johannanananannananaExplorer
Hello,
I am trying to implement the same feature. Did you make any progress on this? - ZsaberhdExplorer
Hi!
I'm still work on it, I used this tutorial for the colocation: https://www.youtube.com/watch?v=elf6WuGzwdI
for the discover I let him a x time for found a colocation, if it is not you can spawn the avatar.
right now I'm focussing on alignment of the avatar because is looks offseted- johannanananannananaExplorer
Alright, thanks for the response! I was also referencing that video. I will try a few things and I can let you know if I find something useful 🙂
- johannanananannananaExplorer
Hello again, I was just wondering if you could elaborate a bit on how you spawn the avatar? I am now calling the SpawnAvatar() function in the Avatar Fusion Spawner if any of the client-side steps outlined in the video fails (if it can't find a discovery session, and if it fails to load and/or align to anchor). If you could explain how you spawn the avatar when it doesn't find a colocation, I would be very grateful 🙂 Thank you
- ZsaberhdExplorer
my goal is a bit different from the topic now but I can share with you without problem how I changed the colocationManager of the video
instead of the basic shared script, I changed the DiscoverNearbySession (because is called only from the not sharedModeMaster client sides)
inside of it I add this two parameter
var discoveryTask = OVRColocationSession.StartDiscoveryAsync();
var timer = timerDiscoverySeconds;
and the I start a while that keep going until the task is completed or the _sharedAnchorGroupID change from null or he take to much time for both of them, then after the while I declare which is the the Result with this ternary
var discoveryResult = _sharedAnchorGroupID != null && !debugRemote ? true : false;
if the result is false, you are not on colocation so you can invoke every type of method you need (SpawnAvatar() for example)
I hope it can help you but I cannot share to much more from my code sorry 😞
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
- 7 months ago
- 2 months ago
- 18 days ago
- 9 months ago