How collision can be handled when CharacterController is rotated ?

Hi,

I am trying to reproduce the anthem flying mode and one thing to note is that when flying, the character is horizontal (vs vertical when walking).

However, due to the nature of the built-in CharacterController, the collision capsule can’t be rotated in X or Z axis. Moreover in this talk, the devs say that the capsule is rotated only in the Y axis as well.

So, when flying how the collisions are handled?
As the capsule doesn’t encompasses the whole character, how does it properly collide with walls for example.

Thanks

My guess is that this is 100% animation. For instance, you could animate the character flying up and down, and then put those clips inside a blend tree. At the physics level, the capsule goes up and down but it doesn’t rotate (pitch/roll).

1 Like

Thanks for the reply, but then how do you prevent going into walls ? (Visually)
As the capsule would collide with a wall after the character “enter” into it. Would it still be with animations ?

I think i would either:
a) add an extra capsule collider and rotate that with the model. By having this extra collider, i can (for example) compute the penetration and maybe push back the whole character… or
b) dynamically increase the radius of the controller (from upright capsule to sphere and vice versa) in order to match the horizontal pose. Probably not a great idea, but it might work.

1 Like

Okay it seems right, thank you for your help !

1 Like