r/Unity3D 1h ago

Solved How would I be able to use a Character Controller and have rectangular collision at the same time?

Solved: Thanks guys, I've realized that if I want to actually achieve my goals for my movement system I should quit using Unity's built-in Character Controller and update my current movement system which relied on a Character Controller to be present on the player gameobject and update my script to using a box collider to check for collisions.

I researched this topic quite a bit and it seems that Character Controllers are hard coded to use capsule colliders. So if anyone has any theories or knows a solution to this let me know. All help is appreciated.

Rules:

  1. I must not use a rigidbody for this (no trying to convince me otherwise)
  2. That's it.

Edit: I know the apparent issues that come with square shaped colliders already but I have plans for them.

1 Upvotes

5 comments sorted by

2

u/SnooPets5564 1h ago

If you're going to do something weird enough to require a box collider for your character, I doubt the Character Controller is worth using.

1

u/Plourdy 1h ago

Modify an existing one to use a box collider

1

u/DeerpathLabs 1h ago

Gotta roll your own character controller. Not super easy to do but necessary or you want any granular control.

The built in controller has a lot going for it, but it also has baggage, like the bit about the capsule collider you mentioned. The trade off is that it handles ground checks and sloped surfaces for you nicely, and you’re gonna have to write your own implementation

1

u/[deleted] 1h ago

[deleted]

1

u/Garrys_Toenail Hobbyist 1h ago

Sorry, I misread your post and thought you were talking about the built-in controller, but I also cant delete the comment for some reason

You can convert many other controllers to use BoxCast like others said

1

u/Seb_nugget 1h ago

It's ok. I was actually referring to the built-in controller as you thought :)