PhysicsCharacterController collision bodies

Hello all! :person_raising_hand:
I’ve been playing around with the PhysicsCharacterController recently. It works great, but I’m wondering how I can get mesh data out of collisions (Trying to get the collided mesh itself ultimately). I see data like the collision bodies are tracked in private functions like ‘compare’. Would it be possible to expose some collision callbacks, or some of the data that’s in the controller manifest? Or am I missing something completely!
Thanks for your time.

You can get some infos like the CharacterSurfaceInfo : Babylon.js docs

It’s possible to get more dataslike the manifolds Babylon.js/packages/dev/core/src/Physics/v2/characterController.ts at fa6b8e4b64ec50f7dcb97dc71c781b97a0a19d11 · BabylonJS/Babylon.js · GitHub

You can also do some raycast to query the physics world and get casting infos.

Ah yeah I see you can access it on the manifold, that’s probably the best way for now then. Is there any plan for manifold data to not be private in the future?
Cheers for the direction!

No plan for that yet. You can open a PR and expose needed infos. Or open an issue with a list of properties you want public..

1 Like