Late reply, but just dropping a line to say we're gonna add skins to all meshes and stick with a single texture. Thanks for all the info

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
//copy the res file to storage
val uri:URI = URI("file://" + outDir.absolutePath)
val resLocator = SimpleResourceLocator(uri) //URI("android.resource://"+ mActivity.applicationContext.packageName +"/raw/seymour_dae"))
ResourceLocatorTool.addResourceLocator(ResourceLocatorTool.TYPE_MODEL, resLocator)
try {
val colladaImporter = ColladaImporter()
colladaImporter.loadTextures(false)
val colladaStorage = colladaImporter.load("test.dae")
animatedGroup = BonesImporter.importCollada(colladaStorage, 1f, null)
animatedGroup!!.isAutoApplyAnimation = false
} finally {
ResourceLocatorTool.removeResourceLocator(ResourceLocatorTool.TYPE_MODEL, resLocator)
}
for (o in animatedGroup!!) {
o.setTexture("floor2.jpg")
o.build()
o.discardMeshData()
}
animatedGroup!!.addToWorld(world)
animatedGroup!!.get(0).skeletonPose.updateTransforms()
animatedGroup!!.applySkeletonPose()
animatedGroup!!.applyAnimation()
//point camera to look at the center of the animated group
var transformedCenter : SimpleVector? = null
for (o in animatedGroup!!) {
o.visibility = true
transformedCenter = o.transformedCenter
}
cam.lookAt(transformedCenter!!)
}
Page created in 0.014 seconds with 13 queries.