use of com.jme3.asset.BlenderKey in project jmonkeyengine by jMonkeyEngine.
the class TestBlenderAnim method simpleInitApp.
@Override
public void simpleInitApp() {
flyCam.setMoveSpeed(10f);
cam.setLocation(new Vector3f(6.4013605f, 7.488437f, 12.843031f));
cam.setRotation(new Quaternion(-0.060740203f, 0.93925786f, -0.2398315f, -0.2378785f));
DirectionalLight dl = new DirectionalLight();
dl.setDirection(new Vector3f(-0.1f, -0.7f, -1).normalizeLocal());
dl.setColor(new ColorRGBA(1f, 1f, 1f, 1.0f));
rootNode.addLight(dl);
BlenderKey blenderKey = new BlenderKey("Blender/2.4x/BaseMesh_249.blend");
Spatial scene = (Spatial) assetManager.loadModel(blenderKey);
rootNode.attachChild(scene);
Spatial model = this.findNode(rootNode, "BaseMesh_01");
model.center();
control = model.getControl(AnimControl.class);
channel = control.createChannel();
channel.setAnim("run_01");
}
use of com.jme3.asset.BlenderKey in project jmonkeyengine by jMonkeyEngine.
the class TestBlenderObjectAnim method simpleInitApp.
@Override
public void simpleInitApp() {
flyCam.setMoveSpeed(10f);
cam.setLocation(new Vector3f(6.4013605f, 7.488437f, 12.843031f));
cam.setRotation(new Quaternion(-0.060740203f, 0.93925786f, -0.2398315f, -0.2378785f));
DirectionalLight dl = new DirectionalLight();
dl.setDirection(new Vector3f(-0.1f, -0.7f, -1).normalizeLocal());
dl.setColor(new ColorRGBA(1f, 1f, 1f, 1.0f));
rootNode.addLight(dl);
BlenderKey blenderKey = new BlenderKey("Blender/2.4x/animtest.blend");
Spatial scene = (Spatial) assetManager.loadModel(blenderKey);
rootNode.attachChild(scene);
Spatial model = this.findNode(rootNode, "TestAnim");
model.center();
control = model.getControl(AnimControl.class);
channel = control.createChannel();
channel.setAnim("TestAnim");
}
Aggregations