Since my game uses LOTS of physics, i recently managed to create a custom character controller for PlyGame that uses rigid body and capsule collider instead of Unity’s “CharacterController”. The normal character controller works fine for games that don’t need physics, but i personally found it too limiting.
Today i spent some hours doing a mixture of reading unity documentation, googling up useful information, picking up code segments from here and there and… with tons of trial and error, my custom character controller was born. The code is currently quite rough and i will make sure to refine it and update it in the close future.
Feel free to ask questions, report bugs or help me improve the script in this thread. I am no super-programmer-guru so i’m open for all improvement suggestions.
Before reporting any bugs, make sure of the following:
Remove “CharacterController” and plyGame top down/third person character controllers scripts that are currently attached to your player. You can keep whatever camera script you are using.
Your character has a rigid body and a capsule collider attached. You can use the same radius/height/etc settings on the capsule collider as your character originally had on the “CharacterController”.
Your “Floor” layer is set on Layer number 8. (It will be by default, if you have not changed it yourself) Also make sure your terrain uses the “Floor” layer.
Don’t use any crazy rigid body settings. I currently use this, and strongly recommend that you do too unless you know what you are doing and change the controller accordingly: