设置3D模型的姿势在Android XRApp

问题描述 投票:0回答:1

在Android Xr App(以及Arcore App)中,加载具有基本交互功能的3D模型的最简单方法是实现Sceneviever。您可以在场景中移动并旋转

glTF
模型,但是,我看不到在将Y轴周围预先修复模型并在将其加载到场景之前将其预先移动的方法。

如何使用Android Xr App?

设置模型(又称姿势)的初步位置和方向

Scene Viewer

enter image description here 不幸的是,目前,在XR场景中

class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContent { AppTheme { val intent = sceneViewerWithIntent() startActivity(intent) } } } } fun sceneViewerWithIntent(): Intent { val intent = Intent(Intent.ACTION_VIEW) val domain = "https://raw.githubusercontent.com/" val path = "KhronosGroup/glTF-Sample-Models/refs/heads/main/2.0/AntiqueCamera/glTF-Binary/AntiqueCamera.glb" val type = "model/gltf-binary" val data = Uri .parse("https://arvr.google.com/scene-viewer/1.2") .buildUpon() .appendQueryParameter("file", domain + path) .build() intent.setDataAndType(data, type) return intent }
kotlin android-jetpack-compose arcore android-xr scenecore
1个回答
0
投票
.glb

模型的位置和方向不能在

.gltf
的Kotlin代码或
Scene Viewer
html tag中更改。
	
最新问题
© www.soinside.com 2019 - 2024. All rights reserved.