View Single Post
Thread: C# for Unity
Just a wee bit of an update;
I coded a nice little CharacterController from scratch! It's First Person, and is pretty easy to use. If people care enough, or need it, I'll add it to the original post. Most people, for jumping, use the "isGrounded' bool, which returns true at an unreliable rate. So, I use a Raycast attached to an Empty GO that shoots down, gets the distance from the object hit, and use a teeny bit of math to figure out if it is in between 2 numbers (so if the object was .1898979 away while I was on the ground, I would test for dist >= .1 && dist <=.2), and if that's true, set public bool Grounded = true. Then, only let the player jump if that bool was true. It's 150% more reliable this way.