Tag Info

Hot answers tagged


Have you considered that it looks very odd for a person to standing perpendicular to a slope? You need to be upright to stay in balance. Some alternatives: Treat his feet as a separate object and rotate them to be parallel to the slope. (A raycast will find the angle's normal, as dnk described. The angle for the feet is that + 90°.) Fake it, by ...


Try using RaycastHit.normal on ground to get normal. Them put char.up = normal


x = cos(yaw) y = sin(pitch) z = sin(yaw) (Depending on the orientation of you coordinate system you could have to put a "-" somewhere) Roll is irrelevant for the lookDir Vector, as it just changes the Up-Vector. Remember that there are theoretically infinite "correct" lookDir Vectors, the one above has the length 1.


The A* path finding algorithm can be used by the "Children" to arrive at a certain destination. You could use this algorithm and only use the next node (since the destination's position isn't necessarily static, aka the "Children" follow the "Root" even whilst it is moving). Path finding is expensive as it is. Here, you'd be (re-)running the algorithm ...


Hey select the game object which is not colliding properly and check whether "isTrigger" is on , if it is then turn it off. Also make sure your collider size is covering the whole object.

Only top voted, non community-wiki answers of a minimum length are eligible