Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi is there a way to enable and disable the behaivor from CopperCube "Game Behaivour > Object or Person controlled by keyboard" programmatically from CopperLicht? thx |
||||
|
Yes, you could simply temporarily remove it from your scene node, like this: var animator = yourSceneNode.getAnimatorOfType('keyboardcontrolled'); If you want it to work again, add it with addAnimator() again. I haven't tried it out, but it should work. |
||||
|
Many thanks, this works for me. But one question just for understanding: Why is this nowhere explained in the documentation (API). Shouldn't there be a class "CL3D.AnimatorKeyboardControlled"? Or comes this animator from the CopperCube export and thus cannot be created directly from CopperLicht? |
||||
|
It's because it's a CopperCube internal animator, and not intended to be used without it. It will probably be changed in the future, so if you want to create your own animator which does things like that, don't base it on this animator. That's why it's not documented. |
|