Skip to content

Commit

Permalink
Re-normalize frame as part of smoothing.
Browse files Browse the repository at this point in the history
  • Loading branch information
n3vu0r committed Mar 6, 2024
1 parent f8264b4 commit 253cedb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_trackball"
version = "0.4.0"
version = "0.4.1"
rust-version = "1.76.0"
authors = ["Rouven Spreckels <rs@qu1x.dev>"]
edition = "2021"
Expand Down
5 changes: 5 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Version 0.4.1 (2024-03-06)

* Add missing re-normalization as part of smoothing, thanks to [mo8it](https://github.com/mo8it).
This prevents panics when dependants enable the `glam_assert`/`debug_glam_assert` feature.

# Version 0.4.0 (2024-02-21)

* Update Bevy to `0.13`.
Expand Down
4 changes: 4 additions & 0 deletions src/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ pub fn trackball_camera(
trackball
.old_frame
.try_lerp_slerp(&trackball.frame, blend, 0.0)
.map(|mut frame| {
frame.renormalize();
frame
})
})
.flatten()
.unwrap_or(trackball.frame);
Expand Down

0 comments on commit 253cedb

Please sign in to comment.