-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translate function not working?? #17
Comments
+ Fixed translate() function ( #17 )
Hi nasser225,
That's why the translation doesn't work. I'm trying to get gtruc to revert this change (because I ran into the same problem as you did). |
I also noticed that translate (and scale) don't seem to be working, but unrelated to the matrix initialization issue you mentioned from the original GLM. As a simple example: M = glm.translate(glm.mat4(1.0), glm.vec3(2.0, 2.0, 2.0))
print("M:\n{}".format(M)) produces:
If I change
Something here is clearly not right. For a sanity check, I confirmed that in C++ the translate and scale functions do the right thing, and they do. |
I accidentally screwed up the macro that generates the two of these functions, resulting in them always using empty arguments. |
I have this from a tutorial:
vec = glm.vec4(1.0,0.0,0.0,1.0)
id_matrix = glm.mat4()
trans_matrix = glm.translate(id_matrix, glm.vec4(1.0, 1.0, 0.0))
vec = trans_matrix * vec
printing vec gives 0.0,0.0,0.0 and I was expecting 2.0,1.0,0.0
Please help! Thanks
The text was updated successfully, but these errors were encountered: