January 2015
Beginner to intermediate
478 pages
9h 46m
English
In a game, we need an actual model exported from Blender or any other 3D animation software.
The assets for our example are provided with the code bundle of this chapter.
Copy these three files to the assets folder of the android project:
car.g3dj: This is the model file to be used in our exampletiretext.jpg and yellowtaxi.jpg: These are the materials for the modelReplacing the ModelBuilder class in our ModelTest.java file, we add the following code:
assets = new AssetManager();
assets.load("car.g3dj", Model.class);
assets.finishLoading();
model = assets.get("car.g3dj", Model.class);
instance = new ModelInstance(model);Additionally, a camera input controller is also added to inspect the model from various angles as follows:
camController ...
Read now
Unlock full access