The Rails extension allows you to define a path that your camera will follow according to your targets position. It’s great for situations where you need that extra control over the camera position but still want the player to dictate its position. One key aspect to understand is that what you’re actually limiting to the path is a target and not the camera itself. This means that you need to add your targets to the Rails extension editor and remove them from the normal ProCamera2D camera targets list.
Camera Targets: The targets which you want to keep their positions limited to the path. Remember, you probably want to remove them from the normal ProCamera2D targets list
Follow Mode: Depending on the direction your targets move you’ll want to experiment what works best for you. On an horizontal platformer you might want to choose HorizontalAxis
- Create nodes: Click on the empty squares in between the other nodes.
- Remove nodes: Hold down
Altand click an existing node to remove it.
- Snapping nodes: Hold down
Commandon Mac) and move the node. To adjust the snap value go to Unity > Preferences > ProCamera2D > Rails Snapping