Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
the position of a scene object must be saved as a variable. the object should be moved to the location of this variable saved without collision. how to do this with javascript? I write this but don't work: save behavior: var player=ccbGetSceneNodeFromName("Camera1"); var curPos=ccbGetSceneNodeProperty(player,"Position"); ccbSetCopperCubeVariable("savePosition",curPos); load behavior: var player=ccbGetSceneNodeFromName("Camera1"); var savePosition =ccbGetCopperCubeVariable("savePosition"); ccbSetSceneNodePositionWithoutCollision(player, savePosition); please anyone make this script for me :) |
||||
|
I can't do coding at all but this line doesn't look correct: var savePosition =ccbGetCopperCubeVariable("savePosition"); Also, you've introduced spaces before the savePosition variables on some lines of code and not on others. Coppercube will see them as different variables if just a single character is different. |
|