Hello, I would like to know if it's possible to modify the character controller to slide "faster" on walls, horizontally, even if the angle between the character direction and the wall is close to 90 degrees.
Thanks.
Character controller sliding question
Re: Character controller sliding question
This would be easiest to handle as a modification to the input to the character controller, as opposed to a modification to the character controller itself. For example, if the raw input would send the character into a wall, make the character's movement direction parallel to the wall instead.
The contacts in the CharacterController.SupportFinder.SideContacts could be useful. The contact normals could be used to modify the movement direction.
Ray casts are another option; the character could collect information about its surroundings before actually ramming into something. The movement direction could adapt smoothly. Depending on the environment, some cleverness would be required in determining the ray samples to avoid missing obstacles. Using both this approach and the contacts approach to fill in gaps might be a good idea.
The contacts in the CharacterController.SupportFinder.SideContacts could be useful. The contact normals could be used to modify the movement direction.
Ray casts are another option; the character could collect information about its surroundings before actually ramming into something. The movement direction could adapt smoothly. Depending on the environment, some cleverness would be required in determining the ray samples to avoid missing obstacles. Using both this approach and the contacts approach to fill in gaps might be a good idea.