Caracter Controller movement and collisions

Hi there,

I started with a cube that I wanted to animate from scratch. I was looking for user control. So I found this basic example: Unity - Scripting API: CharacterController.Move.

All good, but when I commented the gravity line, which means that the y axis would remain untouched, it stopped moving at all. Why does this affect the x and z axis movement?

Also, the character controller’s collider is rounded, while boxes are square, and their corners are overlapping on contact. I also tried adding an additional box collider or a rigidbody component besides the character controller but that didn’t affect anything, the rigidbody also didn’t add gravity when I had that line commented (I tried placing the cub in the air at the beginning).

Can someone explain? Thanks!

Which line did you comment out of the CharacterController example? Can you post the code in its current state?

The CharacterController does overlap with other colliders slightly in normal operation. The amount of overlap is controlled by the Skin Width value, which you can set from the editor.

I don’t know about the problem you have with commenting the line and not being able to move but I do know about you’re rounded edges on the cube character controller. I’m making a game called Qbik where everything is a cube (obviously) but the character controller for the player is a sphere so when jumping onto other blocks the corners stick in :!:

Is there any way to change the character controller to a cube/box :?:

I tried adding a rigidbody but that made no difference :? :? :?