Sidescroll camera has inverted view transform
Closed this issue · 1 comments
I was using nphysics testbed which uses kiss3d under the hood to display some objects and the look_at
method isn't doing what I expected (related issue dimforge/nphysics#243 (comment)). In order to look at (30,20)
for example I needed to call the method with negatives (-30,-20)
. After a bit of digging it seems like the method is a straight pass through to the Sidescroll
camera look_at
method.
I think this line in the sidecroll.rs file:
fn update_projviews(&mut self) {
self.view = Translation2::new(self.at.x, self.at.y).to_homogeneous();
should actually be:
fn update_projviews(&mut self) {
self.view = Translation2::new(-self.at.x, -self.at.y).to_homogeneous();
kiss3d/src/planar_camera/sidescroll.rs
Line 109 in cde25c3
If that seems right I'm happy to create a PR for the change.
You are right, there should be negative signs in there.
If that seems right I'm happy to create a PR for the change.
That would be great!