pyro_akm Registered User |
Quote
|
2012-03-15 14:34:00 |
|
Hello.
Is there a way to know witch node have been clicked when entering in the callback function of CL3D.Animator()?
|
niko Moderator |
Quote
|
2012-03-16 07:50:45 |
|
Hm, currently not, I'm sorry. You could do this by using a callback function like this:
function thisWillBeCalledWhenClicked(thenode) { alert('yay' + thenode); }
var sceneNode = null; // set this to your scene node var yourFunction = function() { thisWillBeCalledWhenClicked(sceneNode); }; var anim = new CL3D.Animator(scene, engine, yourfunction); sceneNode.addAnimator(anim);
|
pyro_akm Registered User |
Quote
|
2012-03-16 11:03:51 |
|
Thank you, I will try to use a JavaScript 'class' with this method to create a generic system (I'm trying to create a generic dialog system).
|