TrackingCam class, available in: Framsticks TheaterCamera object with the automatic target tracking ability.This class has 17 members:
sdleiF
int cam_change0 .. 5
  • 0 = Off
  • 1 = Cut
  • 2 = Move (default)
  • 3 = Look+Move
  • 4 = Zoom+Move
  • 5 = Zoom+Cut
  • Target changeOff - no special target change behavior (treats target change as normal target movement)
    Cut - jumps to new target
    Move - smoothly move to the new target, keeping the attitude
    Look+Move - two-stage animation: first rotate the camera, then move
    Zoom+Move - three-stage animation: zoom out to fit both new and old target in the frame, move to the new target, zoom into it
    Zoom+Cut - two-stage animation: zoom into the old target, cut to the new target and zoom out
    float cam_chspeed0.1 .. 10
    default=1.0
    Change speedReciprocal of the target change time: 0.5 means the change takes 2 seconds, 2.0 is 0.5 seconds. Multi-stage animation may need lower speed to appear smooth and reasonable.
    float cam_dir0 .. -1
    default=30.0
    Direction
    int cam_distrac0 .. 1 (false/true)
    default=0
    Allow manual trackingSuspend automatic tracking when the camera is moved manually
    float cam_h-90 .. 90
    default=45.0
    Height0=side view, 90=top view
    int cam_restrac0 .. 100
    default=10
    Time to restoreRestore automatic tracking after some period of time
    (0 to never restore automatic tracking)
    int cam_tracking0 .. 3
  • 0 = Off
  • 1 = Position only (default)
  • 2 = Chase
  • 3 = Static camera
  • Tracking modeOff - camera does not track the target
    Position only - camera moves to keep the same relative offset from the target
    Chase - camera moves and rotates, staying behind the moving target
    Static camera - rotates to keep the target in frame, switches to another static camera when target moves too far or too close to maintain tracking (similar to security camera systems)
    float cam_trspeed0.1 .. 10
    default=5.0
    Tracking speedAt low speed the camera movement is smoother but may lag behind the target, at high speed follows the target more closely but can be shaky when targetting a chaotically moving creature
    int cam_world0 .. 1 (false/true)
    default=1
    Target world when no selection
    float cam_zoom0.2 .. 3
    default=0.8
    Zoom
    int interacting RO0 .. 2
  • 0 = No
  • 1 = Rotating
  • 2 = Moving
  • user is interacting
    snoitcnuF
    function cam_restore()doesn't return a valueRestore automatic tracking nowUpdate camera position and restore automatic tracking
    function moveTarget(float location_x, float location_y, float location_z, float target_size)doesn't return a valuemoveTargetnotify about the target location/size change
    function setOrient(Orient)doesn't return a valuesetOrient
    function setTarget(float location_x, float location_y, float location_z, float target_size)doesn't return a valuesetTargetselect a new target for the camera
    function setViewDir(float heading_angle, float height_angle)doesn't return a valuesetViewDirheading: 0..360, height: -90..+90
    function tick(float time_span)doesn't return a valueexecute a time stepDisplay-less command line scripts can use tick() to advance time between frames
    Global context>>Experiment definition>>Command line interface>>Framsticks Theater