Created
December 9, 2020 11:19
-
-
Save Kashif-E/b28f744da91ed6f9f03f465f613f207f to your computer and use it in GitHub Desktop.
this function will load the renderable on to sceneview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun onRenderableLoaded(modelRenderable: ModelRenderable) { | |
modelNode = TransformableNode(transformationSystem).apply { | |
setParent(binding.SceneView.scene) | |
translationController.isEnabled = true | |
scaleController.isEnabled = true | |
scaleController.minScale=0.01f | |
scaleController.maxScale=2f | |
rotationController.isEnabled = true | |
localPosition = Vector3(0f, 0f, - 2.3f) | |
renderable = modelRenderable | |
} | |
transformationSystem.selectNode(modelNode) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment