Hi,
I have created animation with Mixamo and its working with:
BABYLON.SceneLoader.ImportMesh("", "./3d/assets/", "female.babylon", scene, function (newMeshes, particleSystems, skeletons) {
var skeleton = skeletons[0];
skeleton.animationPropertiesOverride = new BABYLON.AnimationPropertiesOverride();
skeleton.animationPropertiesOverride.enableBlending = true;
skeleton.animationPropertiesOverride.blendingSpeed = 0.01;
skeleton.animationPropertiesOverride.loopMode = 1;
var walkRange = skeleton.getAnimationRange("walk");
scene.onBeforeRenderObservable.add(()=>{
newMeshes[0].position.z-=1
if(!animating){
animating = true;
scene.beginAnimation(skeleton, walkRange.from, walkRange.to, true);
}
})
});
I have a walk in place
animation, which to move forward, I am moving character in z direction with newMeshes[0].position.z-=1
but issue is I would like to animate character randomly inside an area, so character can automatically walk around, like it can auto walk to different XZ location within an XZ area or on a mesh, is there a way to achieve it?
Thanks
Edit:
Found something Creating A Navigation Mesh | Babylon.js Documentation
digging into it