Meta Spatial SDK Development
Recently active
Hi,I'm currently working on a project using the Meta Spatial SDK, and I have a couple of questions that I need help with.1) Detecting User Interaction to Show a Panel:In my project, I have a 360° video player panel, built with Jetpack Compose, that disappears after 7 seconds of inactivity. I want it to become visible again whenever there is any user interaction (such as any left or right controller input, pinching with hand tracking). Additionally, I’d like the panel to follow the user’s view (camera orientation) during video playback, so that it always stays in the user's line of sight while watching the 360° video.Here’s my current implementation:fun ExoPlayerControlPanel(viewModel: ExoPlayerViewModel) { var isPanelVisible = remember { mutableStateOf(true) } var lastInteractionTime = remember { mutableLongStateOf(System.currentTimeMillis()) } var volume = remember { mutableFloatStateOf(1.0f) } // Hide the panel after 7 seconds of inactivity LaunchedEffect(is
I'm working with a SceneTexture instance passed to a shader for rendering in this fashion: val videoTexture = SceneTexture(Color.valueOf(0f, 0f, 1f, 1f)) videoMaterial = SceneMaterial.custom("myShader", arrayOf( SceneMaterialAttribute("videoTexture", SceneMaterialDataType.Texture2D) )).apply { setTexture("videoTexture", videoTexture) }Is there any way to update the videoTexture without creating a new SceneTexture instance? I've tried the following:frame?.copyPixelsToBuffer(copyBuffer!!) videoTexture.update(copyBuffer!!, frame!!.width, frame.height, 4) videoMaterial!!.setTexture("videoTexture", videoTexture)where frame is a Bitmap with a per pixel byte count of 4 (format ARGB_8888). It results in no visible changes to the texture, even if copyBuffer is empty. It's hard to tell if this is the correct usage or if this update function even does anything at all considering the the lack of information on the official documentation. I've also tried looking through&n
Spatial SDK has a TrackedBody component. That sugeests that there should be a way to access the body tracking info (e.g. the joints). The functionality itself works great in the native example I've tried.I haven't found any examples though with Spatial SDK and all my tries with TrackedBody were unsuccessful. I've tried something similar to AvatarBody, but to na avail.
Hi everyone,I am trying to find a way, after grabbing a Mesh(.glb) to make him replace my controller .I would be happy for any tips.
Hi there! We're looking for an even more dynamic and powerful environment background, along with a wider range of options. It would be fantastic if you could create more variations! Thank you!
I am able to create SceneObjects and view them:val sceneObject = SceneObject(scene, mesh, "foo-object")sceneObject.setPosition(x,y,z)sceneObject.setVisible(true)But I want to add this object to the ECS scene graph. I thought maybe the "entity" parameter specified the parent:val sceneObject = SceneObject(scene, mesh, "foo-object", parentEntity)but it does NOT seem to inherit the parentEntity transform.I have also tried using the Entity.create() method to include the sceneObject:Entity.create(listOf(SceneObject(scene, mesh, "foo-object"), ...)))but this won't even compile (I assume because SceneObject is not a "component"?).I really don't see how to include SceneObject's into a scene graph? How does this work? What it the "entity" parameter for the SceneObject constructor?
Hi to all!There is a way to use Google Services? I need to implement Google SignIn.Thanks!Dimitri
I am able to create SceneObject's that end up being contained within a specific entity as followsval fooObject = SceneObject(scene, fooMesh, "foo", entity = fooEntity)I am able to call setPosition(), setRotationQuat(), and setScale() on fooObject and get the desired effect.When I try to set these transforms on fooEntity only the Transform component works but fooScale is ignored:fooEntity?.setComponent(Scale(fooScale)) // seemingly ignoredfooEntity?.setComponent(Transform(fooPose)) // worksIf I replace setting the Scale component and directly set the scale on the SceneObject this works:fooObject?.setScale(fooScale)This work around is fine as long as stick with only uniform scales and compose the transformations by hand. But I have use cases where I have a hierarchy of transformations that do not have uniform scales.Is there some other ingredient I need for the Scale component to work? It obviously works with Entities containing other
Hi all. Beginning worldbuilder here; weird thing happening. I'm trying to pick up and move objects while building my first world. Every time I do, the terrain underneath comes along with them! (I can place objects like a cube, sphere etc. but can't pick them back up without moving the terrain too.)Snapping is off, so wondering what I'm doing wrong?
Are Ui components of Meta Horizon OS available on any package while using Spatial SDK?i know they are now available in Unity.
Given an array of vertices, normals, texture coordinates, and a triangle index list, how do I create a mesh that that I can load into an ECS Entity?
Asking this question again since my previous question got no response. Is there any config I can declare in my manifest to achieve glass effects for my 2d app like Instagram?
Wondering if there is a way to assign a video source as a texture to an object that has been added to the scene either through the Meta Spatial Editor or imported as GLTF/GLB at runtime?
Hello I've an app in 2d mode, I want to resize dynamically based on content resolution. How can i achieve this?
How can I achieve glass like panel for my app in 2d mode not spatial mode like now it currently works for Instagram?
Hi,Our team is currently in the process of studying and porting a project previously developed in Unity to the new Meta Spatial SDK. This project involves streaming monoscopic 360° videos (not 3D stereoscopic) on the Quest 2 and Quest 3. I'm using the MediaPlayerSample project available on GitHub as a reference for studying. For video playback, I'm utilizing ExoPlayer for streaming, as VideoView, which was initially used in the project, showed significant performance issues during streaming.While testing, I noticed the following performance differences:On the Quest 2, videos with resolutions starting at 4K and above cause severe performance degradation. The device often freezes, and the application becomes unstable, with frame rates dropping to between 30–50 FPS.On the Quest 3, videos up to 5K resolution run perfectly at 90 FPS without any performance issues.This raises a few questions:Is there a way to detect programmatically (in Kotlin) whether the user is using a Quest 2 or Qu
Hi, I am trying to build a simple hybrid app but the problem is as soon as I resize my window, it goes completely black.here is the Basic MainActivity:class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) enableEdgeToEdge() setContent { App() } } } @Composable fun App() { Column { Text("Hello World!", color = Color.White) } }and here is the manifest:<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:horizonos="http://schemas.horizonos/sdk"> <horizonos:uses-horizonos-sdk horizonos:minSdkVersion="69" horizonos:targetSdkVersion="69" /> <uses-feature android:name="android.hardware.vr.headtracking" android:required="true" /> <uses-feature android:name="oculus.software.handtracking"
Hi, I am looking for a way to send small vibration as a haptic feedback on my 2D panel app whenever user hovers their raycast over a UI element, and stronger vibration when they tap on that element.In unity, we can do something like:XRBaseControllerInteractor.SendHapticImpulse(0.2f, 0.1f);how to achieve similar effect in Jetpack? val hapticFeedback = LocalHapticFeedback.current Button(onClick = { hapticFeedback.performHapticFeedback(HapticFeedbackType.LongPress) //nothing happens }) { Text("pick a file") }
Hello I'm developing a quest 2d app using meta spatial sdk which has content of different aspect ratio which is at runtime. How can I set it dynamically so that resizing is locked to aspect ratio?This will prevent pillar boxing
Hello I'm currently developing an app for meta quest which should work on background on any other apps/games like the meta quest browser. Based on my understanding, this is only possible by just porting 2d Android app. But i want to have standalone spatial features using meta spatial sdk as well. Should I make two separate apps or just building one would support both the usecase? Spatial features are just addition to the current 2d app
Why are all the buttons in the Meta Horizon OS UI Set implemented as toggles?
I was trying the Shared Point Anchors sample, and I was trying to build it in Quest 3. Then, the Oculus app on my pc pops up a message for update. Then I did. After that, it was not only this SSA project, but also my other projects won't be able to detect Quest 3 device (I haven't tested other models like Quest 2). And normally, there should be a pop up windown in Quest 3 asking for debugging permissions. And this window is gone, too. If anyone have encountered this before, please help me out... Many thanks!!!
Need access to the logged in user's UUID/Username for an app I'm working on. Trying to prototype something using the Spatial SDK + Platform SDK. Was wondering if that API's exposure is in the works at all. Thanks!
CustomLocomotionSystem from https://developers.meta.com/horizon/documentation/spatial-sdk/spatial-sdk-inputsystem-locomotionsystem is having compilation issues. When I import the code, I get compilation errors. For e.g. unable to resolve InputResult, hand, etc.Please note that the "InputSystem" example is working perfectly fine, just the customLocomotionSystem is having issues. Can someone help fix the code / documentation please
Hello,Does LocomotionSystem support hand tracking? I'm able to move around fine using controllers, but cannot find out how to get it to work with hand tracking. Thanks!
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.