If i have a character thats animated in script, how do i make sure the collisions with ground still works if he as an example draws both his legs upward? Because now he will just float in the air because the character controller uses the capsule collider and that does not change its value. Do i need to write my own character collider or can i somehow read out the lowest point of the character and modify the collider?
Try moving the mesh of this character by code, moving its position to the position of where the capsule collider is.
Something like this:
gameObject.FindWithTag("mycharacter").transform.position = Vector3(0, 0, 0);
//instead of (0,0,0) please insert the coordinates for the capsule collider
hope it helps!
Solved it by putting two “detector gameObjects” on his feet and then use them to calculate were the feet are and then modifying the characterControllers collider.