Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Just for fun tested out Microsoft's Copilot AI to write some Javascript code for Coppercube and I was surprised how close it got to working fine: I just asked it to move a box and thats it - it wrote this for me: var box = ccbGetSceneNodeFromName("Box"); // Function to move the box along the X-axis function moveBox() { var currentX = ccbGetSceneNodeProperty(box, "Position")[0]; var newX = currentX + 1; // Change this value to control the speed of movement ccbSetSceneNodeProperty(box, "Position", newX, 0, 0); } // Call the moveBox function every frame ccbRegisterOnFrameEvent(moveBox); Turns out it uses the correct CC API's to write a function that does just that - the only issue was that ")[0];" does not work and if you change to ").x;" then works fine... I told it to do this using ES5 2nd time over and it didnt change the code so still some teething issues but interesting even still I guess..... |
|