Character Controller Horizontal Capsule Not Supported?

Hi guys, I’m using the character controller component but not on a character but on a vehicule actually after a second thought, as I have already wrote CC specific code and it’s up and runing I don’t wanna switch t standard RB and Colliders.
The problem is the CC seems to be suitable onlt for humanoid characters because the collider capsule that is generates i always directed towards LocalY, so my question is there a way to make it point to LocalX or Z for use on a long pony muscle vehicule or am I forced to use parenting and mess my wholecode again, things don’t look good one Controller component, Why son’t unity add more control to the collider???

The character controller isn’t appropriate for vehicles, and is only ever intended for characters (that’s why it’s called a character controller). It can only be a capsule and can’t be rotated, except around the Y axis.

–Eric

That’s what I thought, Well can I then make a dummy object as a child and rotate around z 90 degrees then add a standard capsule collider to it… I just tried it not working.
Or add a capsule collider to the same object… EDIT not working either.
I guess I just have to make it a wishlist.

Can anybody help adapt this code to a RigidBody?

    public float factor = 10.0f;
    public float jump = 10.0f;
    public float gravity = 10.0f;
    private CharacterController controller;

void Start(){
    controller = gameObject.GetComponent<CharacterController>();
}

	void Update () {
	
        if (controller.isGrounded)
        { 
            moveDirection.x = factor;
            if (!animation.IsPlaying("Run"))// Resume Running After JUMP
            {
		animation.Stop("Jump");				
                animation.CrossFade("Run");
            }
        }
        moveDirection.y -= gravity * Time.deltaTime;// deltaTime necessary
        controller.Move(moveDirection*Time.deltaTime);
	}
    public void Jump()
    {
        if (controller.isGrounded)
        {       
		moveDirection.y = jump;
                animation.CrossFade("Jump"); // Jump animation's loop is ONCE
                Camera.mainCamera.GetComponent<CameraFollower>().JumpFollow();
	    }  
    }

??

i have the same problem with tihs thread, but in my case my character is a Maggot so its on horizontal view and i am also using Character controller. sir @xCyborg if you resolve this issue please help me i really need help PLEAse i am new in unity Please thankyou so much

1 Like