{"id":1595,"date":"2016-08-17T00:39:36","date_gmt":"2016-08-16T16:39:36","guid":{"rendered":"http:\/\/www.clonefactor.com\/wordpress\/?page_id=1595"},"modified":"2016-08-17T03:34:19","modified_gmt":"2016-08-16T19:34:19","slug":"camerabot-zoom-section-setup","status":"publish","type":"page","link":"https:\/\/www.clonefactor.com\/wordpress\/unity3d-show-room\/camerabot\/camerabot-zoom-section-setup\/","title":{"rendered":"CameraBot Zoom section setup"},"content":{"rendered":"<p><iframe loading=\"lazy\" title=\"CameraBot ver 3.0, Zoom section setup\" width=\"1260\" height=\"945\" src=\"https:\/\/www.youtube.com\/embed\/TM0vToIlnLU?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p>This session is made for the zooming camera, the panel you may visualize in video will look like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1596\" src=\"http:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2016\/08\/zoom_session.jpg\" alt=\"zoom_session\" width=\"441\" height=\"281\" srcset=\"https:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2016\/08\/zoom_session.jpg 441w, https:\/\/www.clonefactor.com\/wordpress\/wp-content\/uploads\/2016\/08\/zoom_session-300x191.jpg 300w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><\/p>\n<p>&#8220;Distance (+\/-)&#8221;<br \/>\nThe total distance allow to move, based on orbit camera position as\u00a0origin point,<br \/>\nE.g.1) Distance = 2, which mean forward -2 and backward +2, total length is 4f.<br \/>\nE.g.2) Distance =1, which mean forward -1 and backward +2, total length is 2f.<\/p>\n<p>&#8220;Speed&#8221;<br \/>\nThis value will affect the input zoom value (MouseWheel), to scale up\/down based on your setting.<\/p>\n<pre class=\"brush:csharp\">\/\/\/ &lt;summary&gt;In order to control camera you need to giving the following values.&lt;\/summary&gt;\r\n\/\/\/ name=\"keyHorizontal\"&gt;keyboard horizontal value, rotate orbit yaw angle.&lt;\/param&gt;\r\n\/\/\/ &lt;param name=\"keyVertical\"&gt;keyboard vertical value, rotate orbit pitch angle.&lt;\/param&gt;\r\n\/\/\/ &lt;param name=\"mouseHorizontal\"&gt;mouse horizontal value, rotate orbit yaw angle.&lt;\/param&gt;\r\n\/\/\/ &lt;param name=\"mouseVertical\"&gt;mouse vertical value, rotate orbit pitch angle.&lt;\/param&gt;\r\n\/\/\/ &lt;param name=\"mouseWheel\"&gt;mouse wheel value, for camera zooming usage.&lt;\/param&gt;\r\npublic void UpdatePosition(float keyHorizontal, float keyVertical, float mouseHorizontal, float mouseVertical, float mouseWheel)<\/pre>\n<p>above is the UpdatePosition() API, parameter &#8220;mouseWheel&#8221; representing the raw input value, this speed only affect the local preset setting.<br \/>\ntherefore you can set different across different camera preset.<\/p>\n<p>&#8220;Forward \/ Backward&#8221;<br \/>\nThe\u00a0maximum values for these parameters are limited to &#8220;Distance(+\/-)&#8221;, forward is &#8220;negative&#8221; (&lt;0), backward is &#8220;positive&#8221; (&gt;0),<br \/>\nand Zero (== 0) is not allow to move on that direction, therefore setting both forward &amp; backward to Zero (==0), will result in fix position.<br \/>\nhowever we recommend to disable this feature by setting &#8220;Distance(+\/-)&#8221; to Zero. less performance cost for that condition.<\/p>\n<p>&#8220;Enable Rebound&#8221;<br \/>\nThe major feature for zoom section, to toggle rebound feature.<br \/>\nby enable this feature, developer will allow to control the camera behavior: when and how to return it\u00a0origin distance of\u00a0orbit camera position.<\/p>\n<p>&#8220;Rebound Delay&#8221;<br \/>\nThe delay time to trigger rebound action for the camera angle. Each time player start input or calling UpdatePosition() APi, will reset the count down of rebound.<br \/>\nRebound will start to count down based on this delay values, right after the\u00a0player stop the input stream. (stop control camera\u00a0angle)<br \/>\nafter count down finish the rebound process will start.<br \/>\nE.g. Rebound Delay = 1.3, is representing after player stop input stream and wait 1.3 seconds, the rebound process will start.<\/p>\n<p>&#8220;Rebound Period&#8221;<br \/>\nHow long it will take from current distance to travel back to origin distance, unit on second(s).<\/p>\n<p>&#8220;Rebound Curve&#8221;<br \/>\nThe motion will based on this value. from left to right, current distance\u00a0should be Zero (0.0f), and origin distance should be One (1.0f)<br \/>\nthe animation curve time length\u00a0will scale based on &#8220;Rebound Period&#8221;, we recommend alway setting this animation curve<br \/>\ntime := within 0 ~ 1 seconds,<br \/>\nvalue := within\u00a00 ~ 1 units.<\/p>\n<p>&#8220;Sync with angle&#8221;<br \/>\nby enable this feature, zoom rebound will wait until &#8220;Clamp angle rebound&#8221; happen, which mean even zooming delay is Zero or smaller than &#8220;Clamp angle delay&#8221;, zoom rebound will only happen on player stop changing\u00a0zoom values AND player stop changing any camera angle AND clamp angle rebound are ready to perform. however the zoom section&#8217;s rebound period will not sync with clamp angle rebound period.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This session is made for the zooming camera, the p &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1250,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"full-width-page.php","meta":{"footnotes":""},"class_list":["post-1595","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/pages\/1595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1595"}],"version-history":[{"count":0,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/pages\/1595\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/pages\/1250"}],"wp:attachment":[{"href":"https:\/\/www.clonefactor.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}