hi i am developing a simple player walking game where a glb model walks in a custom glb ground but i am not able to make the model stand on the ground and move to the ground hills
i have used ammo js , cannon js when they are used the model passes through the ground
i have used different type of imposters as well…
finally after disabling physics i have tried by getting the name of the mesh and adding collision to each mesh then also its not working…
will Babylon support these features where i can walk my m=character in any surface of models i import with hills steps high ground etc…no proper documentation , examples have been created we as a team has been behind this for last couple of week ,
we are in a quest , creating a metaverse platform in Babylon , i request the moderators to address our issue as soon as possible thanks in advance
ps : we are using Babylon inside react
hi @Gopakumar9633 and welcome to the forum
Can you please do a playground so we can see what’s going wrong? it’s difficult to figure out with just a description.
thanks @Cedric for replying i have recreated our issue in playground
please have a look around
I did some fixes here and there
@cedric thank you cedric for looking in to the playground , but i guess my doubts are more like
- the character is moving down /sliding down the hill when i release the w key why is that happening? how can we stop that
- if i implement physics using cannon or ammo and when i put the imposter for both ground as well as the human and giving the mass to the human as 1 why its passing through my ground ? shouldn’t it be staying in the ground ?
@Cedric can u address the above doubts
From the first PG you posted, I’d say start by making sure that your character truly is above the ground on init. Actually, put it above the ground and let it fall down on it. If that doesn’t work, as @Cedric says, we’ll need another PG to debug.
okay we will try that out thank you cedric
yes, as I said, it slides because of the gravity pushing down.
I tried with a value of -0.01 and there is almost no slide…but the character falls way slower.
another solution would be to change the gravity value depending on herospeed for example. if the character doesn’t move, then set the gravity to almost 0.
@Cedric i have a query is it possible to integrate ready player me avatar creation to our babylon project and integrate mixamo animations to the same model ?
I have no idea as idk ready player me at all.
Maybe @PatrickRyan knows anything about it?
@Gopakumar9633, I have not used Ready Player Me for anything, but it appears that the hooks are there to use it in Babylon.js. The avatar creation flow is done in an iFrame, and you are able to retrieve a glb from the library to use in your scene. However, integrating Mixamo animations would only be possible if the skeleton hierarchies are an exact match. I didn’t see any information on the skeletons on a quick search of the docs so you would have to download one of the glbs and inspect the skeleton to see. But I have my doubts that they will be an exact match unless Ready Player Me used the Mixamo skeletons to build their service upon. Mixamo has been around for much longer so that would be the only way the animations would be portable.
However, if you do have animation clips using the same skeleton as your asset is bound to, you can easily retarget the animations from one file to another like is done in this example. This playground uses two Mixamo assets, which is why we are able to retarget as they share the same skeleton hierarchy.
@Gopakumar9633, as I was thinking about the business model for Ready Player Me, it occurred to me that they may want to make their assets at least somewhat compatible with Mixamo motion, so I pulled down the sample asset they reference in their docs to look. The skeleton hierarchies are very similar, including naming.
The skeleton on the left is Mixamo. The prefix on the bone names was added by Maya from importing an FBX. This naming would need to be cleaned up if you do go through Maya to make the animation clip glbs. Where you see differences are at the ends of the chains. Extra finger bones at the ends of the fingers, extra bones at the ends of the toes, eyes and head end inside the head. If you were to path animation that did not contain these end bones, your animation would still work as the bones that don’t have an equivalent in the animation file would just not animate and would be driven by their parent which does have representation in the animation curves.
So it does look possible, but there will have to be some amount of work done to prepare animations from Mixamo to target a Ready Player Me asset. But the good news is that where it counts, like the number of spine bones, the hierarchies match.
I’ve gone through this process a few times using Mixamo. I found an old tutorial that helped me through it, here’s a newer tutorial on youtube: