How to make two chracter controllers collide with each other?

Hello! I have two character controllers: one for the player and one for the NPC. However, controllers collide with everything but each other and the player can walk through NPCs. Is there any way to make them collide?

cc @Cedric

You need to create a body+shape and attach it to the player position. This might not be evident with the api. I’ll try to do a sample asap.

I could not find a good and easy way to do it with current state. I’m working now on adding the feature.

2 Likes

Hello, is there any progress on this feature?

I need to be able to check if a ray hits the player body, so I’m thinking of moving a physics body to the player position each frame for collision testing. It will probably require a collision mask so the charactercontroller won’t collide with it?

Anyway if this feature is being implemented I’ll wait for that to be completed :slight_smile:

Yes, still on my plate ! no ETA yet, sorry. If you have a good work around it’ll help you wait, I guess :slight_smile:

1 Like

Better late than never ! CharacterController update by CedricGuillemet · Pull Request #17514 · BabylonJS/Babylon.js · GitHub

3 Likes

Awesome, I was just adding this feature to my project - I’m going to try this out now. Thanks!