ursina
ursina copied to clipboard
Fix a "walk up slope" check
ray.world_normal.y > .7 would prevent real slopes from being considered slopes because it would check if the normal was straight other than a curved slope.
A normal is the direction of the face, not position. So no, it does not check the y position, it checks how horizontal the face is.
A normal is the direction of the face, not position. So no, it does not check the y position, it checks how horizontal the face is.
Still, from my testing, the patch works amazingly, This is a video with the patch (ignore the glitches):
https://github.com/pokepetter/ursina/assets/69512353/5c968dea-5df1-4836-b517-af8304565b50
and this is a video without the patch (ignore the glitches here too):
https://github.com/pokepetter/ursina/assets/69512353/8d6e5203-8052-4b63-b240-d854dba4e622
@pokepetter Could you check the videos I sent?