To add this extension to your virtual cameras, use the Add Extension dropdown menu on the Cinemachine Virtual Camera Inspector window. The extension detects the presence of the Pixel Perfect Camera component, and uses the component settings to calculate for the correct orthographic size of the virtual camera that best retains the Sprites in a pixel-perfect resolution. The Cinemachine Pixel Perfect extension solves this incompatibility.Ĭinemachine Pixel Perfect is an extension for the Cinemachine Virtual Camera that alters the orthographic size of the virtual camera. Using these two systems together in a single scene would cause them to fight for control over the Camera and produce unwanted results. While possible, more advanced camera movements (third person view, etc) are not built into the engine, which focuses solely on top down action games.Using the Cinemachine Pixel Perfect extensionīoth the Pixel Perfect Camera and Cinemachine modify the Camera’s orthographic size. You’ll find an example of it in action in the Loft3D demo scene (use L and M to rotate the camera). It comes with options to also rotate input to match the camera’s direction, determine rotation space and speed, and a dedicated aim option for weapons. While the TopDown Engine focuses on top down action games, which traditionally feature a non rotating camera, the engine comes with a dedicated ability, CharacterRotateCamera, that will let you rotate the camera on the vertical axis (z in 2D, y in 3D) around your character. Don’t hesitate to check its documentation for more info on how to take full advantage of it. The TopDown Engine relies on Unity’s excellent PostProcessing stack for post processing effects. You can also see it in use in the Koala Dungeon demo scene. Check out its documentation for more details on how to use it. Pixel Perfectįor 2D scenes where you want pixel perfect behaviour from the camera, the engine relies on Unity’s native Pixel Perfect Camera component to provide crisp visuals. This is for purely cosmetics purposes, and if you don’t like it, you can (and should) remove it by selecting your virtual camera and settings its Noise dropdown to “None”. Note that most Cinemachine Virtual Cameras in the demos use some form of Noise on them, which makes the camera move constantly, simulating a handheld camera. a CinemachineCameraController, a minimal class that allows you to turn following on or off.an MMCinemachineCameraShaker, used to catch camera shake events and move the virtual camera around in shake patterns.the use of a Cinemachine Confiner, automatically set to the LevelManager’s bounds on start, so you don’t have to worry about it.The only specifics to the TopDownEngine are these components, added to the virtual camera : This documentation doesn’t cover how to use Cinemachine, as its own documentation does that perfectly well. It’s a beautiful and powerful tool, that should cover all your needs when it comes to camera movement and behaviour. The engine relies on Cinemachine to handle cameras base behaviour. The MainCamera is a regular Unity camera, and in most demos the engine uses Unity’s amazing Cinemachine to drive it. It contains one or more canvases, and on them you’ll find buttons, screens, etc. The UI Camera’s Culling Mask is set on UI, which means it’ll only render UI tagged stuff, and is setup to be superimposed over the main camera’s render. Regular and UI Cameras The TopDown Engine's two cameras and camera rigīy default, in most demo scenes of the TopDown Engine, you’ll notice a camera rig : a transform holding a regular camera (2D, 3D, following the player or not, etc) and a UI Camera. This page covers the main scripts and how to use them. There’s nothing mandatory here and you can do whatever you want. Note that you can use any Camera script with the asset, or implement your own, or build on top of the provided scripts. The TopDown Engine includes a few Camera specific scripts. Like for any other Unity project, you’ll need a Camera (or more) in your level to see the action.
0 Comments
Leave a Reply. |