≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
[bug?] click action, ccbSetCopperCubeVariable
Posted by:
(you are not logged in)
Enter the missing letter in: "Intern?tional"
(you are not logged in)
Text:
[quote][b]elmigo[/b] wrote: door has bihavior "when clicked on this do something" with my action OpenDoor which has two subactions "change rotation of a scnene node" Open(rotate y 90) and Close(rotate y -90) then main action save door status by ccbSetCopperCubeVariable camera has bihavior "when key is pressed do something" (LMB keypressed down) with action Shoot probe 1. camera mode LookWhenMouseDown = false, aim at door then click result 1. windows: door always doing action open and camera shoot webgl: door open/close and camera shoot probe 2. camera mode LookWhenMouseDown = true, aim cursor at door then click result 2. windows: door open always doing action open and camera NOT shoot webgl: door open/close and camera shoot bug1: dont stop propagation event when door clicked with LookWhenMouseDown == false or (LookWhenMouseDown == true and webgl platform) bug2: ccbSetCopperCubeVariable not work for windows [code]/* <action jsname="action_OpenDoor" description="Open/Close door"> <property name="isClosed" type="bool" /> <property name="sid" type="string" /> <property name="Open" type="action" /> <property name="Close" type="action" /> </action> */ action_OpenDoor = function() { }; action_OpenDoor.prototype.execute = function(nod) { var cam = ccbGetActiveCamera(); var cam_pos = ccbGetSceneNodeProperty(cam, "Position"); var nod_pos = ccbGetSceneNodeProperty(nod, "Position"); var l = nod_pos.substract(cam_pos).getLength(); if ( l < 30) { var status = ccbGetCopperCubeVariable(this.sid); if (status == true) { ccbSetCopperCubeVariable(this.sid, false); ccbInvokeAction(this.Open, nod); } else { ccbSetCopperCubeVariable(this.sid, true); ccbInvokeAction(this.Close, nod); } print("ops: "+ ccbGetCopperCubeVariable(this.sid)); } } [/code] test project [url]www.elmigo.ru/test/dm3d.zip[/url] my PC - os: win10x64, cpu: intel 7200u, vga: intel hd 620[/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