Jump to content

Skeleton pos whitout animation


Recommended Posts

Hello guys! I have, maybe, a little bit strange question. But how can I set the main position of skeleton or the started position of skeleton I dont know how its named.

When I export model from blender and current animation frame in blender let's say 35, in babylon, if I do not begin skeleton animation, skeleton current frame it is 35.

If I export model from blender and current frame 12, than in babylon main pos of skeleton it is frame 12.

How can I set main pos for skeleton programmatically in babylon. I need set main pos first frame regardless of current frame in blender. Becouse I often export from blender and I can foget set skeleton in first frame and it will not be immediately noticeable in the game. I hope you will understand about what I told :)

Link to comment
Share on other sites

4 hours ago, adam said:

If I understand you correctly, you should use Bone.setPosition on the root bone whenever the animation is playing.


   rootBone.setPosition(x, y, z);


Not exatly. Okay guys, I will try to explain differently.

I have in blender a model with a skeleton and this skeleton has animation walk.

In first frame of animation my skeleton has pose without transformations:

first frame.png


From second frame and to frame 71 my skeleton has animation walk:


animation walk.png


When I export my model in babylon and do not use beginAnimation function, just run babylon project and I see that my model in pose that is equal frame number 36! Like on screenshot:


frame 36.png


I need that when my project start, than first pose equals first frame, like on screenshot:


first frame 2.png


I need this because In this model further in my game I will use shift of the center of the model, but shift of the center of the model uses a frame, which was when my project starts (in my case it frame 36).

If I use for all bones bone.returnToRest, my model is still in frame 36. I want to rest pose of my model,  this was first frame like on first screenshoot.

Thanks to everyone who is trying to understand my problem, becouse English is slightly difficult for me :)

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...