Skip to content

Conversation

@mockersf
Copy link
Member

@mockersf mockersf added the A-Transform Translations, rotations and scales label Feb 25, 2023
Copy link
Contributor

@nicopap nicopap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is like Elm deciding that 1 / 0 = 0, it might not comply with the purely theoretical definition, but I personally think that functional beats pure. Especially if the selected fallback direction is clearly defined.

/// Returns this [`Transform`] with a new rotation so that [`Transform::forward`]
/// points towards the `target` position and [`Transform::up`] points towards `up`.
///
/// In some cases it's not possible to construct a rotation. Another axis will be picked in those cases:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this means we should be returning Result<Self, SomeError> instead, seems odd to silently fail here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we're not silently failing: we're performing a "best-attempt". I'd be open to try variants too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to work by default, instead of having to add unwrap / error management everywhere this pops up

@james7132 james7132 added the C-Bug An unexpected or incorrect behavior label Feb 25, 2023
@james7132 james7132 added this to the 0.11 milestone Mar 4, 2023
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 15, 2023
Co-authored-by: Liam Gallagher <[email protected]>
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 15, 2023
Merged via the queue into bevyengine:main with commit b6b549e Mar 15, 2023
ProfLander pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
Co-authored-by: Alice Cecile <[email protected]>
Co-authored-by: Liam Gallagher <[email protected]>
ProfLander pushed a commit to shfty-rust/bevy that referenced this pull request Mar 19, 2023
Co-authored-by: Alice Cecile <[email protected]>
Co-authored-by: Liam Gallagher <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Transform Translations, rotations and scales C-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Camera3dBundle doesn't render anything when looking from above NaN when looking_at is called with Transform's origin as target

6 participants