Skip to content

Camera Sequences

Camera sequences are pre-choreographed camera movements that play during specific battle events.

Location: config/witness/sequences/

{
"id": "electric_impact",
"name": "Electric Impact",
"duration": 60,
"type": "fixed_duration",
"keyframes": [
{
"time": 0,
"camera": {
"position": "attacker",
"distance": 6.0,
"height": 2.0,
"angle": 10.0,
"lookAt": "target"
}
},
{
"time": 20,
"camera": {
"position": "target",
"distance": 4.0,
"height": 1.5,
"angle": 15.0,
"lookAt": "target"
},
"transition": "smooth"
},
{
"time": 60,
"camera": {
"position": "orbit",
"distance": 8.0,
"height": 2.5,
"angle": 12.0,
"lookAt": "center"
},
"transition": "ease_out"
}
]
}

Pre-defined length sequence:

{
"type": "fixed_duration",
"duration": 80
}

Sequence plays for exact duration in ticks.

Tied to move animation:

{
"type": "move_sequence",
"syncToAnimation": true,
"minimumDuration": 40,
"maximumDuration": 120
}

Adapts to move animation length.

Triggered by battle events:

{
"type": "event_reaction",
"trigger": "critical_hit",
"duration": 50
}

attacker: Position relative to attacking Pokemon

{
"position": "attacker",
"distance": 6.0,
"height": 2.0
}

target: Position relative to target Pokemon

{
"position": "target",
"distance": 5.0,
"height": 1.5
}

orbit: Orbiting camera

{
"position": "orbit",
"distance": 8.0,
"height": 3.0,
"orbitAngle": 45.0,
"orbitSpeed": 0.5
}

fixed: Fixed world position

{
"position": "fixed",
"coordinates": {
"x": 100,
"y": 70,
"z": 200
}
}

center: Battlefield center

{
"position": "center",
"distance": 10.0,
"height": 4.0
}

Define what the camera focuses on:

  • attacker: Focus on attacking Pokemon
  • target: Focus on target Pokemon
  • center: Focus on battlefield center
  • active_player: Focus on player’s Pokemon
  • active_opponent: Focus on opponent’s Pokemon
{
"lookAt": "target",
"trackMovement": true,
"smoothTracking": 0.1
}

instant: No transition

{
"transition": "instant"
}

linear: Constant speed

{
"transition": "linear",
"speed": 0.05
}

smooth: Ease in and out

{
"transition": "smooth",
"acceleration": 0.02
}

ease_in: Accelerate at start

{
"transition": "ease_in"
}

ease_out: Decelerate at end

{
"transition": "ease_out"
}

Zoom in on impact:

{
"id": "dramatic_impact",
"name": "Dramatic Impact",
"duration": 70,
"type": "fixed_duration",
"keyframes": [
{
"time": 0,
"camera": {
"position": "attacker",
"distance": 8.0,
"height": 2.5,
"angle": 10.0,
"lookAt": "attacker"
}
},
{
"time": 20,
"camera": {
"position": "target",
"distance": 3.0,
"height": 1.0,
"angle": 5.0,
"lookAt": "target"
},
"transition": "ease_in",
"effects": ["screen_shake"]
},
{
"time": 70,
"camera": {
"position": "center",
"distance": 10.0,
"height": 3.0,
"angle": 15.0,
"lookAt": "center"
},
"transition": "ease_out"
}
]
}

Circular orbit around Pokemon:

{
"id": "orbit_showcase",
"name": "Orbit Showcase",
"duration": 120,
"type": "fixed_duration",
"keyframes": [
{
"time": 0,
"camera": {
"position": "orbit",
"distance": 7.0,
"height": 2.0,
"angle": 12.0,
"orbitAngle": 0.0,
"lookAt": "target"
}
},
{
"time": 120,
"camera": {
"position": "orbit",
"distance": 7.0,
"height": 2.0,
"angle": 12.0,
"orbitAngle": 360.0,
"lookAt": "target"
},
"transition": "smooth"
}
]
}

Fast cut between positions:

{
"id": "quick_cut",
"name": "Quick Cut",
"duration": 40,
"type": "fixed_duration",
"keyframes": [
{
"time": 0,
"camera": {
"position": "attacker",
"distance": 6.0,
"height": 2.0,
"lookAt": "target"
}
},
{
"time": 20,
"camera": {
"position": "target",
"distance": 6.0,
"height": 2.0,
"lookAt": "attacker"
},
"transition": "instant"
},
{
"time": 40,
"camera": {
"position": "center",
"distance": 12.0,
"height": 4.0,
"lookAt": "center"
},
"transition": "instant"
}
]
}

Add effects to keyframes:

{
"time": 30,
"camera": { ... },
"effects": [
{
"type": "screen_shake",
"intensity": 0.3,
"duration": 10
},
{
"type": "zoom_pulse",
"amount": 1.2,
"duration": 15
},
{
"type": "rotation_burst",
"speed": 2.0,
"duration": 20
}
]
}
  • screen_shake: Shake the camera
  • zoom_pulse: Quick zoom in/out
  • rotation_burst: Rapid rotation
  • slow_motion: Slow camera movement
  • speed_up: Accelerate camera movement

Location: config/witness/move_sequences.json

{
"moves": {
"Hyper Beam": {
"sequence": "powerful_beam",
"priority": 10
},
"Thunder": {
"sequence": "electric_impact",
"priority": 8
},
"Earthquake": {
"sequence": "ground_shake",
"priority": 9
}
},
"moveTypes": {
"fire": {
"sequence": "fire_impact",
"priority": 5
},
"water": {
"sequence": "water_splash",
"priority": 5
}
}
}

Test sequences without triggering battles:

/witness test sequence electric_impact

Preview sequence on a test Pokemon or target dummy.

  • Keep sequences under 120 ticks (6 seconds)
  • Use 3-5 keyframes for smooth flow
  • Allow time for transitions
  • Avoid jerky movements
  • Use smooth transitions between angles
  • Keep important action in frame
  • Limit particle effects
  • Avoid excessive keyframes
  • Test on different server loads