Jump to content
Sign in to follow this  
Koni

Moving camera around an object while attached to it

Recommended Posts

I am trying to attach a camera to a moving vehicle, which is the easy part, but want to be able to have the camera while still attached to it move around the vehicle to another angle in a slow transition, which is the hard part :(

I am using

_cam camsettarget car1;

_cam cameraeffect ["internal", "back"];

_cam attachTo [car1, [0,+5,0]];

_cam camSetFov 0.7;

sleep 5;

_cam camsettarget car1;

_cam cameraeffect ["internal", "back"];

_cam attachTo [car1, [5,+3,0]];

_cam camSetFov 0.7;

_camera camCommitPrepared 4;

waitUntil {camCommitted _camera};

sleep 8;

That keeps the cam on the car for 5 seconds, but it just flicks to the other angle.

How do you move to another angle but in a propper slow transition and not just instantly ?

Thanks

Edited by Koni

Share this post


Link to post
Share on other sites

I'm no camera expert, but I notice you do _camera camCommitPrepared without using any prepared data, not that I have any idea what that's about. Doesn't a normal camCommit work?

Share this post


Link to post
Share on other sites

I'm no camera scripting guru either, just been chopping and changing things around seeing if they will work, though as far as I am aware, the

_camera camCommitPrepared 4

sould be the duration it takes to go from the previous shot to the new one.

Share this post


Link to post
Share on other sites

See the example on camCommitPrepared. But you are using the normal commands rather than the prepare commands. Like camSetTarget where (I believe) you should have used camPrepareTarget? I don't know. Guessing wildly here. Never understood the prepare variants so I just use the normal ones for everything.

Share this post


Link to post
Share on other sites

I think once the cam is attached to a moving object it becomes static\locked on that position, not sure if what I want to do is possible :confused:

Share this post


Link to post
Share on other sites

Oh now I see. Sorry I completely overlooked the attach part (shame on me). While I've never tried cameras, I'm able to move attached triggers simply by keep reattaching them (updating the position array), as I use that method to control "volume" on sound triggers (since we don't have dynamic volume control). You probably have to make some clever math and/or for loops to get nice smoothness.

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  

×