prime31 / Nez

Nez is a free 2D focused framework that works with MonoGame and FNA
MIT License
1.76k stars 355 forks source link

camera 3d view matrix does not include rotation #754

Closed conlanpatrek closed 1 year ago

conlanpatrek commented 1 year ago

I noticed this the other day, and had to monkey in the camera source to get around it (made a couple of things overridable)

Steps to reproduce:

  1. Create a test scene with a sprite and a 3d cube
  2. Move the sprite to the center of the camera, move the 3d cube to the left of the sprite.
  3. Rotate the camera 90 degrees clockwise.

Expected, the cube rotates with the sprite, and is rendered sideways above the sprite. Actual, the cube stays fixed to its position in screen space on the left side.

The issue is in Camera.ViewMatrix3D.

conlanpatrek commented 1 year ago

Oh i didn't realize this was still open. I think that's my fault for not linking back correctly from the PR. Closing.