loloof64 Posted August 3, 2014 Share Posted August 3, 2014 Hello everyone , I've built a Rubik's Cube with the latest BabylonJS version, you can find my experiment here : http://jsfiddle.net/loloof64/UK8Mn/1/ If you click on the two buttons rotateWhole and rotateX, whatever the order, you may notice that there are some troubles : the Rubik's Cube recover its initial state after each move (instead of keeping the last state). My main opinion is that there is a problem with the RubiksCube#clearGroupToRotate() method (line 269) : the way I assign several cubes to the groupToRotate mesh seems weird. But still, I haven't found the best workaround to solve it. Does someone has an idea ? Regards (I've tried to split my JS files into several ones, but it seems that JsFiddle doesn't work this way, even when they are hosted on my Github project, though I managed for the libraries files. And I would like to apologize for this source code presentation) Quote Link to comment Share on other sites More sharing options...
Wingnut Posted August 10, 2014 Share Posted August 10, 2014 Wow, sorry you haven't gotten any replies on the forum, loloof64. I love your project, but your code is a little over my head. But I figured the experts would have jumped aboard this project with you, because it is a cool project! You have apparently stumped the experts, loloof64. My no-solution reply will bring your subject to the top of the forum list again, at least. Any news from your end? Any new discoveries or changes? (thx) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 11, 2014 Share Posted August 11, 2014 I think that in order to keep rotation correct you have to change boxes' position after affecting the parent I mean, let's imagine that the center cube is always the parent then other cubes should have position = originalPosition - parentPosition And obviously you have to do the opposite when removing the parent: position = parentPosition + position Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.