≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
help me in this script
Posted by:
(you are not logged in)
Enter the missing letter in: "Inte?national"
(you are not logged in)
Text:
[quote][b]Sven[/b] wrote: This will do the trick. To use it just.. Create_2D_Touch_Screen_Input (in attributes change input mode to emulate specific key A for example) AND ATTACH THIS ACTION SCRIPT ZoomIN_or_OUT set it 1 to zoom in and 0 to zoom out and set its amount and minmax values. [code]/* <action jsname="action_Camera_FOV" description="Camera_FOV"> <property name="ZoomIN_or_OUT" type="int" default="-1" /> <property name="Amount" type="float" default="0.1" /> <property name="MAX_Amount" type="float" default="140.0" /> <property name="MIN_Amount" type="float" default="30.0" /> </action> */ var counter=0.0; action_Camera_FOV = function() { }; action_Camera_FOV.prototype.execute = function() { var cam = ccbGetActiveCamera(); var Fov = ccbGetSceneNodeProperty(cam, 'FieldOfView_Degrees'); if (this.ZoomIN_or_OUT==1 && Fov >=this.MIN_Amount)//ZOOM IN { Fov-=this.Amount; ccbSetSceneNodeProperty(cam, 'FieldOfView_Degrees', Fov); } if (this.ZoomIN_or_OUT==0 && Fov <=this.MAX_Amount)//ZOOM OUT { Fov+=this.Amount; ccbSetSceneNodeProperty(cam, 'FieldOfView_Degrees', Fov); } return true; }[/code][/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact