This should be a really simple question. I have a scene set up based on the LURPZ 3D demo. I need the character controller to use a box rather than a capsule. How do I do this?
I’ve tried just adding a box collider to the player character and get “character controller is already added. Do you want to replace it with a box collider?”
I do want to replace it, but then I get an error in Thirdperson Controller that there is no CharacterController attached to Player.
Character controllers inherently use capsule colliders, which can’t be changed. If you want to use a box collider, you’d have to make your own character controller replacement.
As far as I know, you can’t use scripting to efficiently do what the CharacterController does. CharacterControllers have the otherwise impossible ability to move and collide without causing real collisions. That is, they use the collision detection side of the physics engine but not the collision handling one. There’s no way I know of to detect collisions but ignore or properly cancel their results.
The best you can hope to implement on your own is some Rigidbody that you push around with forces.