Jump to content
Sign in to follow this  
calo_mir

Camera commands ignored?

Recommended Posts

In the following, the camera moves smoothly from flyby_start_0 to flyby_end_0. The camera switches back to the player's internal camera when the flyby is over. Unfortunately, the camera direction seems to be fixed to 0 degrees and the FOV is unchanged. The camPrepareTarget and camPrepareFOV commands seem to be completely ignored.

What's going on?

_pos_0 = [
 (getMarkerPos "flyby_start_0") select 0,
 (getMarkerPos "flyby_start_0") select 1,
 1.0
];

_pos_1 = [
 (getMarkerPos "flyby_end_0") select 0,
 (getMarkerPos "flyby_end_0") select 1,
 1.0
];

_focus_pos = getMarkerPos "focus";

_camera = "camera" camCreate _pos_0;
_camera camPrepareTarget _focus_pos;
_camera camPrepareFOV 0.200;
_camera camCommitPrepared 0;
_camera switchCamera "INTERNAL";

waitUntil {camCommitted _camera};

_camera camPreparePos _pos_1;
_camera camCommitPrepared 10;
waitUntil {camCommitted _camera};

player switchCamera "INTERNAL";

Share this post


Link to post
Share on other sites

Try using:

camSetFov and camSetTarget

For you to be able to use the:

camPrepareFov and camPrepareTarget

You need to commit the camera. Using:

camCommitPrepared;

_neo_

Share this post


Link to post
Share on other sites

I did use camCommitPrepared, unless you're referring to something else.

Anyway, this works:

_pos_0 = [
 (getMarkerPos "flyby_start_0") select 0,
 (getMarkerPos "flyby_start_0") select 1,
 1.0
];

_pos_1 = [
 (getMarkerPos "flyby_end_0") select 0,
 (getMarkerPos "flyby_end_0") select 1,
 1.0
];

_focus_pos = getMarkerPos "focus";

_camera = "camera" camCreate _pos_0;
_camera cameraEffect ["Internal", "Back"];
_camera camCommand "inertia on";
_camera camSetTarget _focus_pos;
_camera camCommit 0;

waitUntil {camCommitted _camera};

_camera camSetPos _pos_1;
_camera camCommit 16;

waitUntil {camCommitted _camera};

player cameraEffect ["terminate", "back"];

Share this post


Link to post
Share on other sites

Hi,

Yes you did use it, but just here.

Old script.

_camera camPreparePos _pos_1;

_camera camCommitPrepared 10;

waitUntil {camCommitted _camera};

_neo_

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×