Skip to content

Instantly share code, notes, and snippets.

@Kashif-E
Created December 9, 2020 11:19
Show Gist options
  • Save Kashif-E/b28f744da91ed6f9f03f465f613f207f to your computer and use it in GitHub Desktop.
Save Kashif-E/b28f744da91ed6f9f03f465f613f207f to your computer and use it in GitHub Desktop.
this function will load the renderable on to sceneview
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