Rotating 2D sprite (4 vertexes, in a rectangle + texture) causes stretching, stretching compounds after repeated rotations. #3602
Unanswered
XavierCS-dev
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Firstly, my code is public here: https://github.com/XavierCyber/Shwgpup.
I have tried using both matrices and manually rotating each vertex, inside the shader and out, the same result always occurs.
rotating at an angle divisible by pi is initially okay, but gets more stretched after repeated rotations. rotating at angles such as pi/2 or pi/4 causes very strong stretching distortion.
I have tried reddit and stack exchange already, and have yet to find a solution to this issue.
I am pretty sure my rotation maths is fine..but I may be wrong.
Note: I am using cgmath as propose by this tutorial https://github.com/sotrh/learn-wgpu. However I am not using cameras or 3D at all.
Edit: The compounded stretching may be an unrelated issue, as I can rotate without it compounding.
Beta Was this translation helpful? Give feedback.
All reactions