Jump to content

Mesh Box Color Changes when rotating


aninja
 Share

Recommended Posts

Have had a look but have never used animations so am unable to help with that part. As far as I can tell you are using the property rotation and not the method rotate but whether changing this helps or not or is even possible within animations I do not know. Sorry but I cannot help you further perhaps others can. All I can suggest is you try a playground with one cube and no animations to see what is happening.

Link to comment
Share on other sites

Hey, for one cube it's working fine as it has no dependency, as far as i think for animation var UclockAnimation = new BABYLON.Animation("myAnimation", "rotation.y", 20, BABYLON.Animation.ANIMATIONTYPE_FLOAT,BABYLON.Animation.ANIMATIONLOOPMODE_CONSTANT); it take rotation parameter so may be it's doing rotation well thanks for your suggestion 

Link to comment
Share on other sites

1 hour ago, aninja said:

Hi @JohnK thanks for reply I have followed exact the same strategy as you told but it clashes when i start another animation look at this http://www.babylonjs-playground.com/#1MNLNN#0 there are two buttona M Clokwise and U Clockwise same, both works fine independantly but try M->U or U->M please help me to figure out :( 

@Deltakosh please help me out with this issues

Link to comment
Share on other sites

Hi @adam thanks for reply  but in rubix cube we have to change the parent after every rotation, but if a initially assign the central cube as a parent for all the 26 cubes then the whole cube will start rotating and also i can't assign mult parent with a cube please guide me :( 

Link to comment
Share on other sites

It won't work correctly if the rubix is not at world position (0, 0, 0).

Right now I'm using getAbosolutePosition for each cube.  I really need a function that I can use to get the cube position in rubix space.   cube.getPositionInSpace(rubix)

It also screws up if you don't let an animation finish before starting a new animation.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...