Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Not working: var Yeti = ccbGetSceneNodeFromName ('Yeti'); Basically I have a character who follows a path and, when the player comes within a certain proximity, it hides itself and another node will teleport to the position it was at and I want the other node to take the rotation so it looks seamless, but this code isn't working. It says: Code not get property, provided scene node is invalid. Property does not exist: false The first error makes no sense as I named the scene nodes exactly as it appears in the code! |
||||
|
Before the 3th line, you have to define "Yeti1".... var Yeti1 = ccbGetSceneNodeFromName ('Yeti1'); |
||||
|
This is how I move move/rotate nodes: var Yeti1_pos = ccbGetSceneNodeProperty(ccbGetSceneNodeFromName("Yeti1"), "Position");The code moves/rotates Yeti2 to Yeti1's position/rotation. I always leave x,y,z available in case nodes don't exactly match so that I can tweak numbers but if they are the same you can just pass single variable. |
||||
|
Thanks all! It's fixed! |
|