Cinematics

Hey, sorry if this is in the wrong spot. I didn’t think it quite fit as a graphical problem, so I decided to put it in here. Anyway, I was wonder if it is possible to snap a camera to a different position during a cinematic, as well as making a model stop moving, then make it move again. Like if the character was walking, then stopped for a moment to tie his shoe, then continued, if that makes any sense.

Thanks;

About the camera positioning there is a built in system.
you have to register the camera with the cinematic, with a given name. It will return a cameraNode that you can move/rotate like any other node.
Then you can activate a specific cameraNode at a specific time
example :
[java]
// bind the top view
CameraNode camNode = cinematic.bindCamera(“topView”, cam);
// set the node position
camNode.setLocalTranslation(new Vector3f(0, 50, 0));
// set it to look at a specific spatial (teapot) here.
camNode.lookAt(teapot.getLocalTranslation(), Vector3f.UNIT_Y);

    // bind the frontview
    CameraNode camNode2 = cinematic.bindCamera("frontView", cam); 
    // set the node2 position
    camNode2.setLocalTranslation(new Vector3f(0, 5, 50));
    // set it to look at a specific spatial (teapot) here.
    camNode2.lookAt(teapot.getLocalTranslation(), Vector3f.UNIT_Y);


cinematic.activateCamera(0,“frontView”);
cinematic.activateCamera(10,“topView”);
cinematic.activateCamera(15,“frontView”);
[/java]

this will start the cinematic with the frontview, then switch to top view at 10 seconds and switch back to frontView at 15 seconds.
also the cameraNodes can be animated, with motion path if you want some scrolling or panning of the camera.

For the other question, a cinematic knows how to chain animations yes, but you’ll have to make those animations.
I would suggest you read the cinematic doc here https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:cinematics?&#tracks_cinematicevents but i realize it’s outdated. I’m gonna update it.
In the meantime you can check the text cases
TestCinematic : Google Code Archive - Long-term storage for Google Code Project Hosting.
TestJaime : Google Code Archive - Long-term storage for Google Code Project Hosting.

EDIT : I updated the doc on the wiki

Thanks, I’ll take a look at it.

I looked at the TestJaime test class, and when I copy+paste into the SDK, it says that enqueueCInematicEvent doesn’t exist anymore. Is there a replacement method or something that I could use?

actually it doesn’t exist “yet”. You may be using RC2, and there has been some changes in cinematic since then…

We should push a stable at some point.

1 Like

Yeah, I’m using RC2. Will you be able to get the stable up soon? In the mean time, I guess I could finish up the final 2 beginning tutorials.