psikoT Posted February 11, 2018 Share Posted February 11, 2018 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. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted February 12, 2018 Share Posted February 12, 2018 Have you looked here? http://www.html5gamedevs.com/topic/34477-babylonjs-charactercontroller/ Quote Link to comment Share on other sites More sharing options...
psikoT Posted February 13, 2018 Author Share Posted February 13, 2018 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. Quote Link to comment Share on other sites More sharing options...
satguru Posted February 13, 2018 Share Posted February 13, 2018 @psikoT I am curious what the problem might be. Do you mind sharing your character Babylon file? Quote Link to comment Share on other sites More sharing options...
psikoT Posted February 14, 2018 Author Share Posted February 14, 2018 Hi @satguru, thanks for reply... I'll send you the model as soon I have a chance. Quote Link to comment Share on other sites More sharing options...
satguru Posted February 16, 2018 Share Posted February 16, 2018 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 Quote Link to comment Share on other sites More sharing options...
satguru Posted February 16, 2018 Share Posted February 16, 2018 @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 Quote Link to comment Share on other sites More sharing options...
psikoT Posted February 16, 2018 Author Share Posted February 16, 2018 @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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.