Depending on how you get the value set by the user, you can do this in a behavior. Not sure if you are familiar with programming? If so, just use the ccbSetSceneNodeProperty() about like this to set a new rotation: ccbSetSceneNodeProperty(yourNode, 'Rotation', 0, 90, 0) in this case setting the rotation to 0, 90, 0. Yes, there are now multiple ways to do this. So Niko would you mind showing me how I can do that with the new beta "CopperCube for game developers" version ? So only for WebGL.īut with the next update of CopperCube (I hope it will be next week, but at least the week after that) and the new scripting system, it will work on all targets and should be about 4 lines of code to add a feature like you described. With the current version of coppercube, this can only be done with the more extensive API of CopperLicht, that is modifying a property of an existing, built-in behavior (the rotation behavior in your case). Please, say "yes" and don't answer that I must use Copperlicht or something that is out of coppercube ! So can we change all the properties of all objects (nodes) using Javascript in CopperCube (I mean writing code in the "javascript" window that opens when an action "execute javascript" is used, not by using CopperLicht)? I saw that it was possible for special variables but is the case for other properties of the objects? It would be so convenient!! Then, the user must be able to increment or decrement by a click on objects. At the initialization stage the speed must be set to a given value, for example 3. In my scene there is a node that must rotate at speeds controlled by the user. My question may be stupid, I apologize in advance. Ambiera Forum > CopperCube > Programming and ScriptingĬhanging a Coppercube's node property using Coppercube
0 Comments
Leave a Reply. |