Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
So I'm trying to write a simple rotation script for a camera dolly (to smooth the camera, when following an inclined model over bumpy terrain)..... var WD = ccbGetSceneNodeFromName("Walker(Dummy)"); var LProt = ccbGetSceneNodeProperty(WD, "Rotation"); var LP = ccbGetSceneNodeFromName("LevelPlatform"); ccbSetSceneNodeProperty(LP, "Rotation", LProt); This works fine so far but: I only want it to get/set one rotation parameter (y axis), not all x, y, z axes. How do I specifically instruct coppercube to get (or set) a single axis of rotation? I was thinking it may be something like: var LProt = ccbGetSceneNodeProperty(WD, "Rotation", y); But it doesn't work. Thanks. |
||||
|
Ah, I figured it out.... It's a . , not a , to specify an individual parameter. ccbSetSceneNodeProperty(LP, "Rotation", LProt.y); |
||||
|
Glad that you started into scripting |
|