dmay 0 Posted December 29, 2002 Okay, I've got a unit called man2 and a vehicle called car2, a trigger set to true and the activation is man2 moveindriver car2 In the units INIT field I have: [car2, man2, [0,-1,-0.6], true exec "carcam.sqs" I have a script called carcam.sqs that contains: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE"> _unit = _this select 0 _target = _this select 1 _camoffsetX = (_this select 2) select 0 _camoffsetY = (_this select 2) select 1 _camoffsetZ = (_this select 2) select 2 _camrelative = _this select 3 vehiclecamstop = false _cam = "camera" camcreate [0,0,0] _cam cameraeffect ["internal", "back"] #loop _newpos = getpos _unit ? NOT(_camrelative) : _cam camsetpos [(_newpos select 0) + _camoffsetX, (_newpos select 1) + _camoffsetY, (_newpos select 2) + _camoffsetZ]; goto "commit" _cam camsettarget _unit _cam camsetrelpos [_camoffsetX,_camoffsetY,_camoffsetZ] #commit _cam camcommit 0 _cam camsettarget _target _cam camcommit 0 ~0.01 ? NOT(vehiclecamstop) : goto "loop" _cam cameraeffect ["terminate", "back"] camdestroy _cam exit <span id='postcolor'> When the mission begins the camera is on the back seat watching the driver (GOOD) but then the camera flips round to face the opposit way (BAD) what do I need to change in my script so the camera always watches the driver from the rear and not turn away everytime? (turns away as car starts to move, following a waypoint)? Share this post Link to post Share on other sites
dmay 0 Posted January 3, 2003 Well, no one interested in my problem then? Too late anyway I've sorted it out. Share this post Link to post Share on other sites
ralphwiggum 6 Posted January 3, 2003 lol..i guess it's abit late for me to post reply, but i'd suggest something along the lines of 'camsetrelpos' and looping Share this post Link to post Share on other sites