Object Positioning Relative to a Camera by Kira Vakaan19th Jan 2009 20:20
|
---|
Summary Use this function to position and rotate an object relative to a camera's position and rotation. Description Syntax: Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com function OrbitCamera(Camera,Object,XDist#,YDist#,ZDist#,XAng#,YAng#,ZAng#,ZDepthFlag) position object Object,camera position x(Camera),camera position y(Camera),camera position z(Camera) rotate object Object,camera angle x(Camera),camera angle y(Camera),camera angle z(Camera) move object right Object,XDist# move object up Object,YDist# move object Object,ZDist# pitch object down Object,XAng# turn object right Object,YAng# roll object left Object,ZAng# if not ZDepthFlag then disable object zdepth Object endfunction |