pmndrs / ecctrl

🕹️ A floating rigibody character controller
MIT License
467 stars 50 forks source link

Only floating capsule ? #13

Open gdamou opened 8 months ago

gdamou commented 8 months ago

Hello,

Thanks a lot for this great project, I am sure it will have a big impact in the future of web 3D.

Do you plan to upgrade the character control to any type of colliders ? I mean for the moment it works for floating capsule but what about a car ? That is just an example. Maybe it is already possible to convert the capsule to other collider but I didn't find a way to do it.

Have a great day !

ErdongChen-Andrew commented 8 months ago

😁 Thanks @gdamou!

The capsule collider is essential for applying controls, but you can add colliders on top of the capsule within the character component. Here's an example: <Ecctrl><CuboidCollider args={[1,0.2,1]} mass={0}/></Ecctrl>

However, if you change the shape and mass of the character, you may need to adjust the springK and dampingC parameters to find the perfect values for floating and autobalancing.