Help on "OnMove etc." #325
Unanswered
Fpaciello1
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi I'm new to scene view / Ar Core, I added some 3D model using the listener onTapAr :
` onTapAr = { hitResult, _ ->
if (toolActive) {
val anchor = hitResult.createAnchor()
lifecycleScope.launch {
// Load a new model instance for each tap
val modelInstance = GLBLoader.loadModelInstance(
context = requireContext(),
glbFileLocation = "models/sphere.glb"
) as ModelInstance
Now I would like to add a listener to print some debug messages, like position of the sphereModel and rotation when I move it on the scene. I think I should use this :
public open fun onMove( detector: MoveGestureDetector, e: NodeMotionEvent ): Unit
But I can't find a way to work with it. Can you explain me how to use it or provide me some examples? I searched on the internet and I found nothing.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions