Jump to content

Problems rotating a skinned mesh


ProfessorF
 Share

Recommended Posts

On some skinned character meshes, this code works fine:

 

Meshes[0].rotation.Y = SOME RADIAN VALUE;

 

For example, that line works fine with Microsoft's dude.fbx, and usually any other model that I skin and animate by hand.

 

But on other character meshes -  like the ones from Autodesk Character Generator -- the rotation is ignored.

 

Any clues?

 

Thanks in advance.

Link to comment
Share on other sites

Hi,

 

I guess you're exporting your model from 3DSMax. There is a option in the scene properties (right click in your viewport -> Babylon -> Babylon Properties) called "export rotationQuaternion instead of Euler angles". I don't remember exactly the name but you got it :)

If this option is checked (by default it's checked), you have to use mesh.rotationQuaternion to rotate your object. When this attribute is set, mesh.rotation is ignored.

Be careful, you have to use a quaternion to rotate :)

 

I think something like this would do the trick:

mesh.rotationQuaternion = BABYLON.Quaternion.RotationAxis(BABYLON.Axis.Y, SOME_RADIAN_VALUE)
Link to comment
Share on other sites

Thanks guys. 

 

1) @Temechon, I unchecked that option in 3DS Max, but it still exported a quaternion. Maybe something for DeltaKosh to fix.

2) @Dad72, set to null, but then the character was rotated 90 in the X-axis.

 

I was able to kludge it to work by rotating 90-X and then doing the Y-rotation, but still I'd like to find a solution that works for *any* imported character.  

 

Anyway, thanks! I'll keep working on this.

 

 

#AutoDeskCharacterGenerator #3DSMax

Keywords: AutoDesk Character Generator, 3DS Max, Babylon Exporter

Link to comment
Share on other sites

  • 9 months later...

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