Jump to content

mesh and createInstance clone skeleton animation reset location to zero help


Recommended Posts

The animation plays but it reset the position to zero when the play animation. using the assets manager loader. When I try to override position when it play it reset to zero that doesn't work. I wonder if it a bug. I wanted to clone the mesh without need to clone the animation is kind of long way round.

version 2.4.


scene.beginAnimation(this.enemies[0].mesh, 40, 60, true, 0.5); 


for(var i = 0 ; i < this.meshes.length;i++){
            if(this.meshes[i].name == _name){
                var mid = uuid();//random id generator
                model = this.meshes[i].clone(mid,null,true);
                model.skeleton = this.meshes[i].skeleton.clone();

Any idea?

Link to comment
Share on other sites

scene.beginAnimation(this.enemies[0].mesh.skeleton, 40, 60, true, 0.5); 

Manage to get it working. It need some different way to make thing work than examples. To tell them or it way it set animation to position to zero. When copying the mesh. Then chose clone mesh(reset to zero position) or mesh.skeleton.(play current position)

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.

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.


  • Recently Browsing   0 members

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