Skip to main content
added 751 characters in body
Source Link
Stephen
  • 780
  • 3
  • 7

How is the rotated sprite generated? Are these screenshots of a rotating 3D model? The facing angle could be off due to the camera perspective of the 3D modeling tool. Isometric perspective is not an accurate representation of the 3D space. Stuff far away from the 'camera' does not get smaller.

If you just want a quick fix. Solution 2 might be difficult to get right. Solution 3 seems easy just swap the frames not matching the angle with one that fits the angle better.

The lasers will still be off sometimes. As you are not doing a smooth rotation but showing different frames for certain degree ranges.

EDIT:

Your problem is that the generated screenshots are not isometric perspective, but a normal 3D camera view.

enter image description here

Isometric view simulates 3D space but is not an accurate representation. Things get smaller with increasing distance from the camera. This is not done for isometric perspective as this would cause ugly scaling artifacts in the sprite.

Your space ship screenshots are made with 3D camera perspective. Thats why the laser shooting is off. Compare the red line in the 'isometric' and the 'perspective'.

Your sprite generator should use Matrix.CreateOrthographic() instead of Matrix.CreatePerspective() for the projection matrix.

How is the rotated sprite generated? Are these screenshots of a rotating 3D model? The facing angle could be off due to the camera perspective of the 3D modeling tool. Isometric perspective is not an accurate representation of the 3D space. Stuff far away from the 'camera' does not get smaller.

If you just want a quick fix. Solution 2 might be difficult to get right. Solution 3 seems easy just swap the frames not matching the angle with one that fits the angle better.

The lasers will still be off sometimes. As you are not doing a smooth rotation but showing different frames for certain degree ranges.

How is the rotated sprite generated? Are these screenshots of a rotating 3D model? The facing angle could be off due to the camera perspective of the 3D modeling tool. Isometric perspective is not an accurate representation of the 3D space. Stuff far away from the 'camera' does not get smaller.

If you just want a quick fix. Solution 2 might be difficult to get right. Solution 3 seems easy just swap the frames not matching the angle with one that fits the angle better.

The lasers will still be off sometimes. As you are not doing a smooth rotation but showing different frames for certain degree ranges.

EDIT:

Your problem is that the generated screenshots are not isometric perspective, but a normal 3D camera view.

enter image description here

Isometric view simulates 3D space but is not an accurate representation. Things get smaller with increasing distance from the camera. This is not done for isometric perspective as this would cause ugly scaling artifacts in the sprite.

Your space ship screenshots are made with 3D camera perspective. Thats why the laser shooting is off. Compare the red line in the 'isometric' and the 'perspective'.

Your sprite generator should use Matrix.CreateOrthographic() instead of Matrix.CreatePerspective() for the projection matrix.

Source Link
Stephen
  • 780
  • 3
  • 7

How is the rotated sprite generated? Are these screenshots of a rotating 3D model? The facing angle could be off due to the camera perspective of the 3D modeling tool. Isometric perspective is not an accurate representation of the 3D space. Stuff far away from the 'camera' does not get smaller.

If you just want a quick fix. Solution 2 might be difficult to get right. Solution 3 seems easy just swap the frames not matching the angle with one that fits the angle better.

The lasers will still be off sometimes. As you are not doing a smooth rotation but showing different frames for certain degree ranges.