mirror of
https://github.com/bevyengine/bevy
synced 2024-11-26 22:50:19 +00:00
2857eb6b9d
# Objective - Fixes scaling normals and tangents of meshes ## Solution - When scaling a mesh by `Vec3::new(1., 1., -1.)`, the normals should be flipped along the Z-axis. For example a normal of `Vec3::new(0., 0., 1.)` should become `Vec3::new(0., 0., -1.)` after scaling. This is achieved by multiplying the normal by the reciprocal of the scale, cheking for infinity and normalizing. Before, the normal was multiplied by a covector of the scale, which is incorrect for normals. - Tangents need to be multiplied by the `scale`, not its reciprocal as before --------- Co-authored-by: vero <11307157+atlv24@users.noreply.github.com> |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml | ||
README.md |