Author Topic: [Solved]Creating Cameras  (Read 440 times)

Hey guys, I'm making a script where you can plop down cameras and then switch between them. I'm just having problems... creating the cameras. Here's what I made:

function createCamera(%player)
{
   %c = new PathCamera()
   {
      position = %player.getHackPosition();
      rotation = %player.rotation;
      canSetIFLs = 0; //IDK what this does, but it's a thing on the default cam so lol
      dataBlock = "EventCam";
      scale = "1 1 1";
   };
   talk(%c);
   return %c;
}

datablock PathCameraData(EventCam)
{
   cameraMaxDist = 0;
   cameraMinDist = 0;
   cameraDefaultFov = 90;
   cameraMinFov = 10;
   cameraMaxFov = 150;
};


I got it from the EventCamera mod. I don't think it's exactly right, and when I switch to a camera it takes a few seconds to kick in (if at all). What's an easy way to make a camera that isn't tied to a player? I'll post the full script if needed.
« Last Edit: August 01, 2015, 02:13:14 AM by Johnny Blockhead »

Do you want to create cameras, or path cameras? The Camera class is a normal camera while the PathCamera class will actually move along a designated path.

I... wow. I really didn't think to just try camera. Thanks a bunch, Greek.