Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
real-time text information

zcfwei
Guest
Quote
2020-03-06 01:51:05

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.
🔎︎

🔎︎



Robo
Guest
Quote
2020-03-15 09:04:21

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)
}


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

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