A set of cogs, with included items.dat and static.jkl.
To use: Include the templates from static.jkl into your mod's. (You can ignore first if you have something as a buffer, since the first template in static.jkl is unusable).
Include a line similar to the one in items.dat into your mod's items.dat. Be sure to update the CAMERABIN constant in cameratester.cog to the appropriate bin number.
To retrieve the location of the camera, use this line.
This assumes cameraPosition to be a vector, and CAMERABIN as a constant with the bin number of the camerafinder cog in it.
cameraPosition = VectorSet(SendMessageEx(GetInvCog(GetLocalPlayerThing(), CAMERABIN), user0, 0, 0, 0, 0),SendMessageEx(GetInvCog(GetLocalPlayerThing(), CAMERABIN), user1, 0, 0, 0, 0),SendMessageEx(GetInvCog(GetLocalPlayerThing(), CAMERABIN), user2, 0, 0, 0, 0));
If you wish to use as a level cog, you'll have to include the templates from the static.jkl into your level's templates, and add the cog camerafinder.cog to your Used Cogs section.
Note: There may occasionally be minor errors in the calculation of the position, however, it should be sufficient 90% of the time, I think.
Some basic cog knowledge to set it up.
For use in a mod. Is possible to use as a level cog, however.