I’m making a 3d first person shooter against zombies, I’ve downloaded zombies models amd converted in XML and then in J3o. In the code I’ve created a node
Node zombieNodeModel = (Node) assetManager(…);
And a Geometry
Geometry zombie = (Geometry) zombieNodeModel.getChildren(name);
My two question are:
- How can I apply a texture on my zombie geometry without distorting it
- How can I animate it (I’ve got all the animation in my model)
If your model is fully rigged and animated, then you just need to get its AnimControl .This tutorial should show you exactly the code you’d need for this
Does the model already have a texture?
If the model came un-textured, and does not have texture coordinates assigned, then I would suggest importing it into an external editor for 3d Modeling and texturing like Blender so that you can unwrap and texture your model.
If the model came with textures, then you may still want to use a 3d editor for re-texturing the model. I usually use the Texture Paint mode in Blender to create clean texture atlases for my models since Blender is free, but I know there are also more advanced editors for texturing that may interest you as well, such as Z-Brush.
And if it started with a texture and you want to keep the texture then probably you need to find a way to import it that doesn’t lose the texture.
…but we weren’t provided with enough information to help with that.