Hey @Cedric I am still having issues with getting my chracter controller working like you have the BABYLON.PhysicsCharaterController.
I cant use (and frankly dont fully understand) your implmentation for movement, which is beautifully smooth, by the way, especalliy the stairs and slopes… Just beautiful ![]()
From this snippet here:
const support = characterController.checkSupport(dt, down);
const desiredLinearVelocity = getDesiredVelocity(dt, support, characterCurrentOrientation, characterCurrentVelocity);
characterController.setVelocity(desiredLinearVelocity);
characterController.integrate(dt, support, characterGravity);
const newPosition = characterController.getPosition();
and what you have at https://playground.babylonjs.com/?inspectorv2=true#WO0H1U#13
I cant really tell what is the full rhyme or reason for movement code.
What is ACTUAL required code to move (with collisions) and what is just the sample code ?
Especalliy what in getDesiredVelocity
Is all that the Required way of doing movement or just the way you are handling things for this demo, which brings me back to what is required for movement.
I am so used to Unity and Ammo for character based movement both of which seem to move with collision by its move function with a moveVelocity. (Kinda how the basic Babylon mesh.moveWithCollisions works).
I raycast download to detect IsGrounded … etc…
I would luv to switch my BACKEND RIGIDBODY base character controller I created with just Pure Ridigbody physics with your offical BABYLON.PhysicsCharacterController
Again… I am trying to fully understand what makes it tick so I can refactor my Unity Exported Character Controllers
Any detail information on how this really works:
const support = characterController.checkSupport(dt, down);
const desiredLinearVelocity = getDesiredVelocity(dt, support, characterCurrentOrientation, characterCurrentVelocity);
characterController.setVelocity(desiredLinearVelocity);
characterController.integrate(dt, support, characterGravity);
const newPosition = characterController.getPosition();
What is actually required to get that moveWithCollisions type movement we had with built-in babylon movement or btKinematicCharacterController from Ammo.js
Please feel free to DM me if needed.