# Waypoint Controls

The spectator camera in Medieval Engineers supports some pretty cool camera Waypoint Controls. This is primarily useful for people making video recordings or creating tours, and not directly usable in gameplay.

Version: | 0.6.4 |

## Waypoint Controls

Default Key | Action | Description |
---|---|---|

+ | Copy Position | Copy the current spectator camera position into the clipboard. |

+ | Paste Position | Set the spectator camera position and orientation to the position data from the clipboard. |

+ + | Add Waypoint | Adds a waypoint to the waypoint list. |

+ + | Copy Waypoints | Copy the entire waypoint list into the clipboard. |

+ + | Paste Waypoints | Paste the copied waypoints from the clipboard into the waypoint list. |

+ + | Cut Waypoints | Copy the entire waypoint list into the clipboard, then clear the list. |

+ + | Clear Waypoints | Clears the waypoint list. |

+ + | Toggle Waypoint Following | Toggles the spectator camera following the waypoints. |

## Static Camera Controls

First, we will cover the static camera controls. These are the controls that do, basically, one thing: Change the spectator camera position.

- Enable Spectator Camera
- The ever familiar key turns on spectator camera controls, if you are in creative, or have admin mode enabled.
- You can move it around with , controls its movement speed, and finally, + lets you control the rotation sensitivity. For more information see Spectator Controls.

- Copy Position
- Pressing + while in spectator camera mode it will copy the current position, orientation and field of view to your clipboard.
- You can then go to any text editor and paste it there for future safe-keeping. This is great if you just want to get the exact same camera position between sessions.
- Something like this is what will be in your clipboard:

`0;70;{X:3391.24021766589 Y:3265.19593806485 Z:1805.85533371632};{X:0.479614496231079 Y:0.650396406650543 Z:-0.200805649161339 W:0.553743243217468}`

- The first value is time in seconds, in this case zero, the second number is the Field of View, in this case 70, and then there is a world coordinate and an orientation quaternion.
- We don't expect you to edit the last two values by hand. :-)

- Paste Position
- Pressing + with the waypoint info in the clipboard will put your spectator camera in the exact position and field of view as described by the line.

That's all for the static camera controls, there's only so much you can do with a non-moving camera.

## Dynamic Camera Controls

We also provide some dynamic camera controls, in fact, you see them used a lot in the 0.6.4 release trailer, where we make great use of FoV and smooth movement curves.

- Debug Draw
- Use the + debug screen and check Debug Draw to enable waypoint rendering. This starts drawing the waypoints automatically as soon as there are waypoints in the spectator data. If you just turn it on now, you will see nothing yet but they will show after we create them.

- Add Waypoint
- + + Adds a waypoint to the internal list of waypoints using the current camera position, orientation and field of view. If there are other waypoints present in the set, it will set its time to N, where N is the total number of waypoints in the list.

- Toggle Waypoint Following
- + + Toggles the spectator camera to follow the list of waypoints in its internal data list. Once you have a few waypoints defined give it a try to see how easy it is to set up a path.

- Copy Waypoints
- + + Copies all the waypoints in the internal list to the clipboard. You can then paste this into your text editor of choice.
- For example, here is a short clip that flies around the safe area:

0;70;{X:3439.86140169491 Y:3239.13278567759 Z:1749.83360087308};{X:0.0859107822179794 Y:0.021029544994235 Z:-0.388925313949585 W:0.917013764381409} 1;70;{X:3464.4226182281 Y:3219.44866660066 Z:1731.68298188405};{X:0.274177402257919 Y:0.453115344047546 Z:-0.202366605401039 W:0.823748111724854} 2;70;{X:3463.23559921895 Y:3249.01979218997 Z:1693.55049210362};{X:0.355335980653763 Y:0.840311825275421 Z:0.280481278896332 W:0.298232465982437} 3;70;{X:3431.9492022056 Y:3277.2492814643 Z:1706.72307526967};{X:0.255064636468887 Y:0.755376040935516 Z:0.466835886240005 W:-0.382639914751053} 4;70;{X:3429.04367602287 Y:3266.05046512388 Z:1747.55672165653};{X:-0.171517193317413 Y:-0.256870865821838 Z:-0.479175269603729 W:0.821577906608582} 5;70;{X:3439.86140169491 Y:3239.13278567759 Z:1749.83360087308};{X:0.0869224965572357 Y:0.0206004176288843 Z:-0.388948261737823 W:0.916918396949768}

- If you want to experiment with the numbers, you can change the timing. Right now, the waypoints are following each other every 1 second, but change it to different values and see how it affects the game. Or edit the field of view of 70 to different numbers on each line and see what happens.

- Paste Waypoints
- + + Clears the internal list of waypoints and adds all the waypoints in your clipboard to the waypoint list. Copy the list of waypoints from the copy waypoints section above, and paste it into the game, then press + + to watch it work.

- Clear Waypoints
- + + Clears the internal list of waypoints. Sometimes you just need to start over!

- Cut Waypoints
- + + Copies all the waypoints to clipboard, and then clears the list of waypoints. This is the same as pressing + + and + + .

And that's all for controlling spectator waypoints. There are a few more tricks, but they are primarily reserved for the editing phase in the text editor.

## Additional Functionality

The spectator camera boasts one more feature, and that is the interpolation style. The system offers three styles: `Smooth`

, `SmoothStep`

, and `Linear`

.
It doesn't allow multiple styles within one set, because we chose to keep it simple. :-)

You can enable these by adding the word Smooth, SmoothStep or Linear to your set of waypoints.

**Smooth animation**

Smooth 0;70;{X:3436.7799825383 Y:3245.52404296485 Z:1727.78180421085};{X:0.198698669672012 Y:0.0229045283049345 Z:-0.371597111225128 W:0.906592428684235} 1;70;{X:3448.31647168926 Y:3237.21993882808 Z:1721.12369906937};{X:0.308746457099915 Y:0.392760634422302 Z:-0.251023024320602 W:0.829097151756287} 3;70;{X:3444.00344144442 Y:3232.84226280276 Z:1715.61581324075};{X:0.301728576421738 Y:0.296935349702835 Z:-0.295487880706787 W:0.856432259082794} 5;70;{X:3440.9055392568 Y:3239.31739827816 Z:1709.35056969628};{X:0.412100255489349 Y:0.827982187271118 Z:0.0381522998213768 W:0.378369241952896} 7;70;{X:3438.0619897605 Y:3240.4411852794 Z:1712.39691792812};{X:0.345308721065521 Y:0.903446316719055 Z:0.217590898275375 W:-0.131152033805847} 9;70;{X:3438.80634319783 Y:3237.44527774735 Z:1716.28351582913};{X:-0.463291615247726 Y:-0.161866679787636 Z:-0.615796804428101 W:0.616404354572296} 10;70;{X:3441.22933892348 Y:3238.66448594548 Z:1719.89001703588};{X:-0.128119856119156 Y:0.224206730723381 Z:-0.291904777288437 W:0.920927941799164} 11;70;{X:3444.52070867643 Y:3236.32446625677 Z:1728.73553221812};{X:0.194621995091438 Y:0.155912205576897 Z:-0.336478441953659 W:0.908072650432587}

**SmoothStep animation**

SmoothStep 0;70;{X:3436.7799825383 Y:3245.52404296485 Z:1727.78180421085};{X:0.198698669672012 Y:0.0229045283049345 Z:-0.371597111225128 W:0.906592428684235} 1;70;{X:3448.31647168926 Y:3237.21993882808 Z:1721.12369906937};{X:0.308746457099915 Y:0.392760634422302 Z:-0.251023024320602 W:0.829097151756287} 2;70;{X:3444.00344144442 Y:3232.84226280276 Z:1715.61581324075};{X:0.301728576421738 Y:0.296935349702835 Z:-0.295487880706787 W:0.856432259082794} 3;70;{X:3440.9055392568 Y:3239.31739827816 Z:1709.35056969628};{X:0.412100255489349 Y:0.827982187271118 Z:0.0381522998213768 W:0.378369241952896} 4;70;{X:3438.0619897605 Y:3240.4411852794 Z:1712.39691792812};{X:0.345308721065521 Y:0.903446316719055 Z:0.217590898275375 W:-0.131152033805847} 5;70;{X:3438.80634319783 Y:3237.44527774735 Z:1716.28351582913};{X:-0.463291615247726 Y:-0.161866679787636 Z:-0.615796804428101 W:0.616404354572296} 6;70;{X:3441.22933892348 Y:3238.66448594548 Z:1719.89001703588};{X:-0.128119856119156 Y:0.224206730723381 Z:-0.291904777288437 W:0.920927941799164} 7;70;{X:3444.52070867643 Y:3236.32446625677 Z:1728.73553221812};{X:0.194621995091438 Y:0.155912205576897 Z:-0.336478441953659 W:0.908072650432587}

**Linear animation**

Linear 0;70;{X:3436.7799825383 Y:3245.52404296485 Z:1727.78180421085};{X:0.198698669672012 Y:0.0229045283049345 Z:-0.371597111225128 W:0.906592428684235} 1;70;{X:3448.31647168926 Y:3237.21993882808 Z:1721.12369906937};{X:0.308746457099915 Y:0.392760634422302 Z:-0.251023024320602 W:0.829097151756287} 2;70;{X:3444.00344144442 Y:3232.84226280276 Z:1715.61581324075};{X:0.301728576421738 Y:0.296935349702835 Z:-0.295487880706787 W:0.856432259082794} 3;70;{X:3440.9055392568 Y:3239.31739827816 Z:1709.35056969628};{X:0.412100255489349 Y:0.827982187271118 Z:0.0381522998213768 W:0.378369241952896} 4;70;{X:3438.0619897605 Y:3240.4411852794 Z:1712.39691792812};{X:0.345308721065521 Y:0.903446316719055 Z:0.217590898275375 W:-0.131152033805847} 5;70;{X:3438.80634319783 Y:3237.44527774735 Z:1716.28351582913};{X:-0.463291615247726 Y:-0.161866679787636 Z:-0.615796804428101 W:0.616404354572296} 6;70;{X:3441.22933892348 Y:3238.66448594548 Z:1719.89001703588};{X:-0.128119856119156 Y:0.224206730723381 Z:-0.291904777288437 W:0.920927941799164} 7;70;{X:3444.52070867643 Y:3236.32446625677 Z:1728.73553221812};{X:0.194621995091438 Y:0.155912205576897 Z:-0.336478441953659 W:0.908072650432587}

You can see the difference in the path, and it is up to you to determine which style fits your scene best. We find that Smooth generally provides the best results.
But if you carefully manage your waypoints you can make great shots with SmoothStep and Linear too.

Adjusting the times of the waypoints affects Smooth style most of all, because it interpolates smoothly incoming velocity and exit velocity for each waypoint. Changing the time can greatly affect the path of the camera as it may be able to move steeply, or more carefully, navigate your waypoints.

The debug path rendering will be of great help here to figure out the path the camera will take, and there's really no other way than carefully editing the waypoints by hand and experience.

The Movement Controls and Spectator Controls also apply to creating waypoints.