Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Align character to wall

$
0
0
Hello guys, i'm making a WallJump mechanic in my game, and its almost done and working fine. The only thing left that I want to do, is to **align my character to the wall that its touching**. (This should also be useful when making the character climb a ledge or stair.) I get the wall normal usign a raycast, and then i set my character eulerAngles to be equal the hit.normal, but this only works in certain walls ( ones that have a specific normal value, something like (0,0,1)), in others, it gets very messed up. I guess that it have something to do with world and local values... Well, that's it, i hope someone can help me.

Viewing all articles
Browse latest Browse all 171066

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>