I'm writing this new controller that uses a rigid body as the main character. What I would like to implement into it, is a way to tell if a character is touching a wall and what side of the character side of the character the wall is touching.(meaning right, left, back and front for animators sake) I know character controllers have a method detect collision from different sides but do rigid bodies have one as well? Or will I have to create away to do it with raycast? If so I think I should say I have never worked well with arrays and if you can could you bring up an example. The main problem with this is I really don't know what direction (hahaha puns) I should go with this.
and if you do show any code can it please show it in c#?
if not it'll be fine
↧