Height bellow the character controller

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
dimitrijejankov
Posts: 4
Joined: Sat Sep 01, 2012 11:14 pm

Height bellow the character controller

Post by dimitrijejankov »

Hi, well I was experimenting with the character controller in the demos, and I can't figure out how to get the height below the character to the nearest support... If somebody could help me out :D
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Height bellow the character controller

Post by Norbo »

If you want to know the data about an existing support, CharacterController.SupportFinder.SupportData would do the trick.

If you want to search down for a surface to see how high the character is floating or something, then use a Space.RayCast pointing downward from the character. Use with a filter delegate to ignore the CharacterController.Body; otherwise, the ray cast would always hit the character.
dimitrijejankov
Posts: 4
Joined: Sat Sep 01, 2012 11:14 pm

Re: Height bellow the character controller

Post by dimitrijejankov »

Thx for the reply.. I will do this right away.. oh and your character controler is awesome thx for it :D
Post Reply