For question and support regarding BitBenderGames Unity Asset Store Assets, feel free to send us an email or a unity forum post:
Unity Forum: Mobile Touch Camera Thread
Mobile Touch Camera FAQ
Q: Is There Demo?
A: Yes. In the official Forum Thread
Q: The camera only moves left or right. What’s wrong?
A: Make sure the Camera Axes on the MobileTouchCamera script is set properly.
Q: The perspective camera gets zoomed in way too far.
A: The default values for the camera zoom are set to work mainly for orthographic cameras. Perspective cameras need different values. Make sure to find fov or distance values that fit for the min and max zoom and set them on the MobileTouchCamera script for the Cam Zoom Min/Max parameters. Note that you can decide between Field Of View based and Translation based zoom for perspective cameras. Field Of View based zoom leaves the camera position untouched when zooming, whereas Translation based zoom moves the camera in and out for zooming.
Q: The camera rotation doesn’t work. What’s wrong?
A: The rotation feature is disabled by default and must be enabled in the MobileTouchCamera component. The option is called Enable Rotation and is found in the Advanced section of the component in the inspector.
Q: How to prevent the camera from moving when pressing on a Unity UI button?
A: Attach the EventTrigger component to the button, set the Event Type to PointerDown and select the OnEventTriggerPointerDown method from the TouchInputController script, attached to the camera, as event receiver.
Q: How to pick and drag scene objects?
A: Make sure the scene object has got either a Collider oder Collider2D component attached. Then attach the MobileTouchPickable script to the gameobject and it should work.
Q: The camera is not pixel perfect. When panning, the scene is drifting.
A: The camera assumes that the scrollable content of your scene (e.g. the ground of your game-world) is located at y = 0 for top-down cameras or at z = 0 for side-scrolling cameras. So you can either move the objects of your game-world to the 0 position, or you can give the offset value to the Ground Level Offset parameter in the MobileTouchCamera component. Example: You are using a Top-Down camera and the ground plane of your strategy game is located at 0/-12/0 (x/y/z). In order to achieve pixel perfect scrolling of the game-world you need to enter the value -12 in the Ground Level Offset parameter.
Q: Picked items get dragged to odd positions, what’s wrong?
A: In case your ground level is not at y = 0 for top-down cameras or at z = 0 for side-scrolling cameras you need to adjust the Ground Level Offset on the MobileTouchCamera to the ground Level.
Q: When using the MobilePickingController with a custom selection event handler I get an exception “ArgumentException: failed to convert parameters”.
A: In the list of event functions make sure to select the “Dynamic Transform Version” of your event handler. The same function may be in the list twice, with only the dynamic version working properly.
Q: Can I disable the camera smoothing?
A: Yes. You can either set the ‘Camera Follow Factor’ value to something extremely high, e.g. 1000, which practically disables the smoothing. Or you can disable it in code by setting the IsSmoothingEnabled property of the Mobile Touch Camera to false.
Q: Can I make the camera automatically focus on a touched/selected item?
A: You can use the FocusCameraOnItem script to do so. Attach this script to the camera. Then use any of the ‘On Pick Item’ events on the MobileTouchCamera component to invoke the according callback in the FocusCameraOnItem component.
Q: I reset the camera rotation from script and now the camera behaves weirdly, what’s wrong?
A: When changing the rotation, some internal script variables related to the boundary computation need to be recomputed. You can do that by invoking the ResetCameraBoundaries() method on the MobileTouchCamera component.