Character Controller vs. Rigidbody Capsule Collider

I’ve been experimenting with a Character Controller in my demo project, and it works relatively well, minus two problems.

  1. If an object (e.g., a big cube) is rotating on it’s Y-Axis, I can run my Character Controller through said cube. I’ve read that I can fix this problem by decreasing the time step in the physics engine (haven’t tried it yet though)
  2. If an object (e.g., a big cube) is moving around, it will run right through my Character Controller, and I seemingly cannot get any collision data in order to deal with this (unless I’m doing something wrong, but if I’m correct two Kinematic colliders won’t register a collision with each other).

These are both very big issues. Given enough time, I could implement a hack or ‘design around the problem’. However, I’m looking at using a Capsule Rigidbody and use physics to control it. This opens up a whole new bunch of problems:

  1. I’ve been programming since 2001 with using Kinematic controls, physics is entirely new (learning isn’t bad but time consuming)
  2. Using physics… results in realistic simulations. I’m using a Character Controller now because of the lack of realistic movement needed
  3. There will be some problem that will eventually crop up that I’ll have to develop a hack or ‘design around the problem’ with (such as getting unrealistic results out of a physics simulation).

I’m just looking for a discussion. To each project their own, but could anyone give me advice on this? I’d rather not go down route A only to realize much much later that I should have taken the other path

All your questions are answered here:

http://unity3d.com/support/documentation/Manual/Physics.html

do all your moving objects have rigidbodies and colliders? the Character controller and .simplemove should do collision for you if you have applied the correct components…

static items should just have colliders.

Hey Koyima,
I’ve looked over that document before, and thank you for posting a link to it. It is a great reference to have. Anyway, what type of controller do you use in your projects? Rigidbody or Character Controller?

At the end of the day, I’m afraid of using Rigidbody and having to deal with a bunch of hacks to get it to work like a Character Controller. whereas I’d have to do a bunch of hacks to get a Character Controller to deal with a rigidbody. :confused:

Anyway, if I am correct, if I use a Rigidbody, I will have to worry about objects slipping off slopes and inclines unless there’s enough friction within the material for it to not occur? I mean, having an item slide off a platform would be nice in some instances (in the project I’m planning) but I’d rather have this be the exception case and not the norm when it comes to design.

A rigidbody will never push a character controller, and should a rigidbody move into the place where the character controller is, it will always just keep moving through.

Your character controller must instead somehow react to the event and act accordingly.

I found this post that seems to offer a kind of solution for this:

It’s a “two sided” thing, where the moving object is the one reacting but calling a function in the character controller that basically tells it to “react to push”, to put it in pretty terms.

In this specific case, it seems to be coded only for X axis push. (Note I have not tested this myself)

I may still be new at this, but is it possible that in addition to what Thars said the two ridged bodies are telescoping?

Well that’s why I posted the link to the documentation, cos it’s different depending on what you want to achieve. What I do or what everyone else does is not so important, since we don’t know what you want to do, what you are comfortable coding and which solution solves more issues thatn it creates.

I would use the character controller, but this is because I am not looking for physics interaction, but even if I was I might still use it, depending on how extensive the use of “real physics” would be. Basically it depends on your design document.