Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
How to realize the Kanban information display function of coppercube needs to realize the real-time text information display of the specified 3D object. I hope the teacher with relevant experience can guide the method. Thank you. |
||||
|
You can read object data - just record all this in an array and connect it to the name of the object. Then on highlight or click get the current node (once within proximity) query the info from your array based on said object name. - I use my own extension for that as had issues with it only in basic java-script to reliably do that. Then query the info you want from your array something like using an array named 'arrayData' and variable 'display' to determine whether to show up any display info or not. var name=ccbGetSceneNodeProperty(currentNode,"Name"); var check = arrayData.indexOf(name); if (check == -1) { ccbSetCopperCubeVariable("display", 0); } else { ccbSetCopperCubeVariable("display", 1); var info1 = arrayData[check+1]; var info2 = arrayData[check+2]; var info3 = arrayData[check+3]; var info4 = arrayData[check+4]; } Me, personally use something like this to get the current node in my own extension: action_CurrentNode = function(){}; action_CurrentNode.prototype.execute = function(currentNode) { ...(add anything you need in here) } |
|