Jump to content

Character Controller


psikoT
 Share

Recommended Posts

Hi, sorry if this question has been answered before, but couldn't find a proper solution for a Character Controller... I've tried some character setups from this forum but they don't work with my models.

Is there any simple example that I can take as starting point?

Thanks in advance.

Link to comment
Share on other sites

Hi, thanks for reply... yes, I've tried hard to implement that solution, but it didn't worked with my character. For some reason, the character start rotating crazy in the Z axis. 

I'm exporting from 3dsMax, with the default orientation from the biped. It runs fine after exporting though. I'm wondering if there's any way to compare my models with the model from that example.

Link to comment
Share on other sites

Hi @psikoT

Thanks for providing the character.

Found what the issue is.

Your model has Z up and Y forward.

Babylon (and the Character Controller) expects Y up and Z forward.

Here is a screenshot of your character in babylon sandbox.

If you can change that then it will work fine.

Nice character and animations by the way :)

 

sandbox.jpg

Link to comment
Share on other sites

@psikoT 

Found a way by which you can make your model work without changing its orientation.

Create an empty mesh, make it a parent of your model and pass that, instead of your model, to the character controller.

Use character controller setAvatarSkeleton() method to set the skeleton to your model's skeleton

Attached  is an updated version of your index.html which works.

 

index.html

Link to comment
Share on other sites

@satguru

I was totally sure that it was Y-up, as I'm used to the FBX exporter from 3dsMax, which has an option to change the vertical axis. Unfortunately, the Babylon exporter has no such option, but I think I have a workaround inside 3dsMax. If it doesn't work, then I'll try to make the parent mesh in Babylon as you suggested. For some reason the controls don't work in your example, but I'm probably missing something. Still very new on this.

Thanks very much for the input, I really appreciate. And glad you like the model. The animations are from Mixamo, in case it helps.

Cheers

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