All pastes #117297 Raw Edit

Scripting Cameras

public lua v1 · immutable
·published 2006-08-05 21:25 UTC
rendered paste body
#Global Hooks$GameInit:[--Due to FRED having a limit for characters in sexps, function names are super acroymnized--create CameracC = function(name, px, py, pz, ox, oy, oz)	pos = ma.newVector(px,py,pz)	ori = ma.newVector(ox,oy,oz)	ts.setCamera(ts.createCamera(name, pos, ori))end--create Camera with ObjectscCO = function(name, objPos, objOri)	pos = objPos.position	ori = objOri.position	ts.setCamera(ts.createCamera(name, pos, ori))	end--set CamerasC = function(name)	ts.setCamera(getCameraByName(name))end--move Camera TomCT = function(x, y, z, time, acc)	destVec = ma.newVector(x,y,z)	thisCamera.setPosition(destVec, time, acc)end--move Camera To ObjectmCTO = function(object, time, acc)	destVec = object.Position	thisCamera.setPosition(destVec, time, acc)end--pan Camera TopCT = function(x, y, z, time, acc)	destVec = ma.newVector(x,y,z)	thisCamera.setOrientation(destVec, time, acc)end--pan Camera To ObjectpCTO = function(object, time, acc)	destVec = object.Position	thisCamera.setOrientation(destVec, time, acc)	end]#End