- Home /
Modified Mobile TapControl.js logic flow works, but No Apparent Cam Zoom/Rotate Response
I've Debug.Log tested my modified TapControl.js from Standard Assets (mobile) - it responds to my finger touches for zoom and rotate, but I cannot seem to get the camera to do anything.
I'm guessing this is something to do with my setup in the editor, rather than code.
I've assigned camera's, and set up that camera to look like this hierarchy: CameraPivot / CameraOffset / camLayer (with ZoomCam.js)
I have two camera's in a split-screen setup, but only the cam I want to zoom is set to MainCamera tag - also, that is the one assigned to Camera Object
Any idea why the main camera is not responding?
Answer by ina · Dec 25, 2010 at 07:56 AM
In my case, the problem was silly - the zoom=Mathf.Clamp( zoom, zoomMin, zoomMax );
in ZoomCamera.js kept on putting my zoom to 0, so the zoom value remained 0 in zoomCamera, even if TapControl sent otherwise.
Rotate still does not work though :-(
--
Edit, it was simply not having the "rotate enabled" switch flipped in inspector. While it was assigned as true in globals, the assignment in inspector was not updated, and apparently that overrides the assignment in code.
Your answer
Follow this Question
Related Questions
Orbit Camera Zoom limit 1 Answer
moving Camera with touch constrained to up & down 1 Answer
Smoothly zoom object at point or camera boundaries 2 Answers
Pinch zoom 0 Answers
Use mouse to move camera along fixed axis through city scene 0 Answers