-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
return Direction3d from Transform::up and friends (#11604)
# Objective Drawing a `Gizmos::circle` whose normal is derived from a Transform's local axes now requires converting a Vec3 to a Direction3d and unwrapping the result, and I think we shold move the conversion into Bevy. ## Solution We can make `Transform::{left,right,up,down,forward,back,local_x,local_y,local_z}` return a Direction3d, because they know that their results will be of finite non-zero length (roughly 1.0). --- ## Changelog `Transform::up()` and similar functions now return `Direction3d` instead of `Vec3`. ## Migration Guide Callers of `Transform::up()` and similar functions may have to dereference the returned `Direction3d` to get to the inner `Vec3`. --------- Co-authored-by: Alice Cecile <[email protected]> Co-authored-by: Joona Aalto <[email protected]>
- Loading branch information
1 parent
91c467e
commit d6f1649
Showing
5 changed files
with
34 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters