Fixes a camera to an object so that any movement of the object also affects the camera. The camera uses its current position, rotation, and scale as an offset to the object. For example if the object was placed at 10,5,0 and a camera was fixed to it with a current position of 0,10,0 then the camera would now inherit the position of the object, combine it with its own, and the camera would be placed at 10,15,0. The same applies to rotation and scaling, so if the object was rotated around the Y axis then the camera would rotate by the same amount. Note that using GetCameraY would only show its local position relative to the parent object (in this case it would return 10). To get the final world position of the camera use GetCameraWorldY, which in this case would return 15. There is no limit to the number of objects or cameras an object can have fixed to it, nor is there a limit to objects being fixed to objects which are fixed to other objects, just don't create any loops. To stop a camera being fixed to anything set objID to 0 and it will become independent again.


FixCameraToObject( cameraID, objID )