Skip to content

Movement Scripts

Kinsi edited this page Oct 13, 2021 · 16 revisions

Movement Scripts (Camera2/MovementScripts/*.json)

The "known" format for movement scripts was changed from Camera Plus, it is no longer a list of movements, but of keyframes. If you try to load a Camera Plus movement script with Camera2 it will be converted to the new format automatically.

Example Movement Script Setup / Configuration

MovementScriptExample

The Movementscripts must be manually assigned to the respective camera on which it should be active, the bottom part of the Screenshot is the part of the Camera config related to that

Format

syncToSong

When true, the movement script pauses when you pause the song and vice versa.

loop

When true (default), the movement script will only play once and stay on the last keyframe (Useful for creating something like a "Intro" animation when starting a song)

Frames

position / rotation

Should be obvious. An easy way to get positions / rotations is to manually reposition a camera and then copy the position / rotation from the camera config.

duration

Time in seconds over which the frame's values will be transitioned to coming from the previous state.

holdTime

Time in seconds to wait before processing the next frame

FOV (Optional value, defaults to no change)

Can be used to change the cameras FOV

transition (Optional value, defaults to Linear)

Can be Linear or Eased

Example Script

You can save this as under any name.json in your MovementScripts folder and assign it to a camera to see the effect

{
  "syncToSong": false,
  "frames": [

    {
      "position": {
        "x": -4.452,
        "y": 1.255,
        "z": -0.396
      },
      "FOV": 100,
      "rotation": {
        "x": 355.177,
        "y": 87.821,
        "z": 0
      },
      "holdTime": 3
    },

    {
      "position": {
        "x": -0.721,
        "y": 2.003,
        "z": 7.825
      },
      "FOV": 23,
      "duration": 10,
      "holdTime": 2,
      "rotation": {
        "x": 6.35,
        "y": 173.716,
        "z": 0
      },
      "transition": "Eased"
    },

    {
      "position": {
        "x": 0.074,
        "y": 1.077,
        "z": -2.689
      },
      "FOV": 90,
      "duration": 3,
      "holdTime": 2,
      "rotation": {
        "x": 5.351,
        "y": 359.423,
        "z": 0
      }
    }

  ]
}