Jump to content

Home

Camera tracking


JavaGuy

Recommended Posts

I'm trying to open my level with a simple cinematic where the camera just follows a path to where the player starts. It _basically_ works except that the camera moves around in circles every time it comes to a path corner. Also, the camera does not turn to face the direction it's moving.

 

Is it possible to do this with the TRACK command, or should I simply use MOVE/PAN? It would really be a lot easier to use path_corners, but it doesn't seem to work for me.

Link to comment
Share on other sites

camera ( ENABLE );

camera ( TRACK, "opentrack", 50, 0 );

wait ( 10000 );

 

affect ( "kyle", FLUSH )

{

set ( "SET_WEAPON", "WP_SABER" );

set ( "SET_SABERACTIVE", "true" );

set ( "SET_OBJECTIVE_SHOW", "KEJIM_POST_OBJ1" );

}

 

remove ( "kyle_opening" );

camera ( DISABLE );

Link to comment
Share on other sites

k after the enable command put in a move command that points to a ref tag; so your camera has a place to start so to speak. the move is zero so it will appear to start at your first path corner;

depending on how close your path corners are, your speed is too fast, set it to 10 or less and use the speed key in each of the path corners and set youre speed there. it overides the speed set in the script. double check that the path corners are targeted in succession correctly. and the first path corner target name is what is in the track command of the script. you may need a fade command in there as well.

 

example

//Generated by BehavEd

 

rem ( "testtrack" );

camera ( /*@CAMERA_COMMANDS*/ ENABLE );

camera ( /*@CAMERA_COMMANDS*/ FADE, < 0.000 0.000 0.000 >, 1.000, < 0.000 0.000 0.000 >, 0.000, 0 );

camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "testcam1", ORIGIN)$, 0 );

camera ( /*@CAMERA_COMMANDS*/ TRACK, "track1", 10.000, 0 );

wait ( 5000.000 );

camera ( /*@CAMERA_COMMANDS*/ DISABLE );

Link to comment
Share on other sites

This track command seems not working.

 

I did everything you wrote and it goes to the ref tag and then starts track from outside of the map. How's funny is that hehehe. It goes to the last path corner but it bumps to the wall (like wants to get out of the map again :D) and on and on till the wait time is up to disable the camera.

 

Interesting huh.

Link to comment
Share on other sites

There's another thread where I ask about the same problem using MOVE/PAN to move the camera around, which is what I tried after I gave up on TRACK. I still see the same behavior, so it's probably the same problem or similar.

 

I _know_ it works though, because there are cut-scenes in the SP game that use it. There's the opening part of the NS Streets scenario where the camera zooms through the city. There's also the scene where Kyle is captured and the camera moves out of the cell and down the corridor. So there has to be a way to make it work.

Link to comment
Share on other sites

Ok. I just want to mention an important aspect about camera controlling.

 

move

pan

wait

 

The moving time and the wait time MUST be the same. If the wait time is lesser than the moving time, then the camera's origin is not CHANGED. So the camera will go to the first move command's origin, and then start moving from there to the second move command's position.

 

Lemme give an example to make it clear.

 

Example 1.

 

camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam_start", ORIGIN)$, 0 );

camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cam_start", ANGLES)$, < 0.000 0.000 0.000 >, 0 );

 

camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam1", ORIGIN)$, 4000 );

camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cam1", ANGLES)$, < 0.000 0.000 0.000 >, 4000 );

wait ( 4000.000 );

 

camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam_end", ORIGIN)$, 4000 );

camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cam_end", ANGLES)$, < 0.000 0.000 0.000 >, 4000 );

wait ( 4000.000 );

 

camera ( /*@CAMERA_COMMANDS*/ DISABLE );

 

In this example, everything is fine. The camera completes its moving to origins.

 

However if you change the cam1's wait( 4000.000 ); to wait( 3500.000); , The camera will NOT complete its moving to origin. So when moving to the end, it will start from the cam_start's origin to cam_end's origin.

Link to comment
Share on other sites

Some lines from cinematic14 script which ns_streets uses at startup.

 

task ( "CAMERA_FLY" )

{

//(BHVDREM) camera ( /*@CAMERA_COMMANDS*/ PATH, "roff/cinematic14_mr_flyin" );

camera ( /*@CAMERA_COMMANDS*/ PATH, "roff/cinematic14_flyin" );

}

 

dowait ( "CAMERA_FLY" );

wait ( 16000.000 );

 

Sorry guys, Raven doesn't use track command of camera controls. I never understand what those roff files are thou.

 

I'm searching for camera follow command.(which is useless in our situtation, but im curious if they used it)

 

What a pity.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...