Hi Everyone!
I would like a nice intro cinematic at the start of my game. It involves camera movement. More specifically, I have created a motion path for the camera to follow (which it does, successfully!), but I want to add in some custom rotation to the camera.
I am aware that you can tell the camera to look at a specific object/location, but is there a way that I can keyframe specific rotation values for the camera (to yield smooth motion)?
My cinematic method, should it be of any use
[java]
public void introCinematic()
{
Cinematic iCinematic = new Cinematic(rootNode, 25);
stateManager.attach(iCinematic);
MotionEvent cinematicMotionControl;
CameraNode cinematicCamNode = new CameraNode(“IntroCinematic”, cam);
MotionPath introMotionPath_1 = new MotionPath();
introMotionPath_1.addWayPoint(new Vector3f(75,130,510));
introMotionPath_1.addWayPoint(new Vector3f(75,110,450));
introMotionPath_1.addWayPoint(new Vector3f(75,35,250));
introMotionPath_1.addWayPoint(new Vector3f(0,10,0));
introMotionPath_1.addWayPoint(new Vector3f(0,25,-150));
introMotionPath_1.addWayPoint(new Vector3f(0,50,-300));
introMotionPath_1.enableDebugShape(assetManager, rootNode);
introMotionPath_1.setCurveTension(0.4f);
flyCam.setEnabled(false);
cinematicCamNode.setEnabled(true);
iCinematic.play();
cinematicMotionControl = new MotionEvent(cinematicCamNode, introMotionPath_1);
//cinematicMotionControl.setLookAt(new Vector3f(0,50,0),new Vector3f(0,1,0));
//cinematicMotionControl.setDirectionType(MotionEvent.Direction.LookAt);
cinematicMotionControl.setLoopMode(LoopMode.DontLoop);
cinematicMotionControl.setSpeed(0.5f);
cinematicMotionControl.play();
rootNode.attachChild(cinematicCamNode);
iCinematic.addListener(new CinematicEventListener(){
public void onPlay(CinematicEvent cinematic) {
}
public void onPause(CinematicEvent cinematic) {
}
public void onStop(CinematicEvent cinematic) {
System.out.println("Reached End!");
}
});
}
[/java]
Thanks in advance!