This asset consists of a feature dense script designed to provide a top-down or side-scroller camera utilizing continual smooth movement. It maximizes vision for the player and is optimized for combat scenarios and high-speed maneuverability.
It’s both simple and quick to implement and still highly customizable. Optimized for mobile platforms as well.
MoveAhead: Moves the camera in the direction the Player is moving based on its speed.
ZoomOut: Zooms the camera out based on Player speed.
LockOn: Assign a LockOn target so that the camera keeps both, it and the Player in sight. Has following types: Temporary, returning and permanent.
Shake: Shakes the camera. Allows custom duration, intensity and uses intelligent algorithms to add additional shake effects.
CursorFollow: Moves the camera based on the screen space position of the cursor from the Player.
Restrictor: Allows colliders and coordinate min/max to limit camera position.
Optional aspect ratio correction for mobile platforms.
Features:
Simple and quick to set up. Use prefabs, or simply add the main script to the camera.
Smooth at all times, even when disabling and enabling functions, changing parameters and toggling activation at runtime.
A large amount of exposed parameters for detailed setting options.
Allows setting a base camera rotation into any direction. That can include a tilt.
Modular functions. Each can be toggled on and off. Code is written to be customizable (c#). Parameters are set up to interact with external scripts. You can change single functions without affecting others.
Full documentation of all functions, parameters and methods, and a coherent ReadMe file. Contains sufficient demos.
Mobile friendly, as main functions do not require a cursor. Has near zero performance drain.
Compatible with other types of camera assets, as it only moves the camera position via the LateUpdate method.
Greetings!
The asset is still working well, and no reports of bugs yet (currently 5 stars!). It is now monetized, so it costs $10 now. This way I can get a feedback to how much interest there is for it, and get an incentive to expand on further assets and even this one.
The next asset would be one for vehicles, both on ground and air, with new features which should improve the camera even more than current assets. The goal is to maximize the view of the user, provide neat camera features all the while the camera is kept smooth.
Another asset could be a strategy camera controller with the typical standards plus additional features. It would have everything one would expect it to provide, and more. A smooth movement and the best possible user control are essential.
As I work on new assets, this one would get improvements as well. I will also enable upgrading in a reasonable way: The whole bundle will cost much less than all assets combined. And upgrading from one asset to the complete pack will cost less than purchasing a second asset. This allows the assets to be kept relatively cheap and purposive, but still make a good bundle price. Another reason for that is that parts of this asset can be salvaged for that purpose, and some parts would be shared anyway.
If you have suggestions or requests, go ahead and share them here! Or E-Mail me.
Hi, can you tell me more about what are the differences between the ‘TopDownCamera’ and ‘TopDownMobileCamera’, I’m thinking about publishing to desktop and mobile, can I just use the second one for both?
Hi, sure. The only difference is that the FlexCamAspect.cs script attached to the TopDownMobileCamera, which adjusts the aspect ratio for vertical screens. If attached and enabled, it will keep the horizontal distance (from your Player object to the corner of your screen) constant no matter the resolution and the height would remain variable. If not attached, it uses the standard Unity behavior, which keeps the vertical distance constant instead, and the horizontal one variable. Otherwise you can simply add or remove the script “FlexCamAspect.cs” at any time (even runtime).
The mobile friendly functionality is always given regardless - it’s embedded in the main script, in the functions themselves. The only function which would not work on mobile would be the “CursorFollow” as you’d have no cursor. But generally yes - you can use the same prefab for all platforms.
For mobile games it should be more reasonable to be able to rely on the display based on the shortest length, which is usually the horizontal one for mobile screens. But as I answer your question, I just realized that mobile phones can be rotated to have their verticals to be the shortest too. And if you want to publish your game on both mobile and PC, you may want to have a script which takes care of all these cases.
So I just implemented that little tweak and added a boolean to have that behavior (keeping the shortest distance, be it vertical or horizontal, constant). I will update the asset, but it usually takes days to be updated on the asset store. E-Mail me and I can send you the actualized FlexCamAspect.cs script right away. It might be what you want anyway.
Edit: Version 1.1 has been submitted and should be online in a couple of days. More details when it’s online.