From cd3fe1cd1851c02a17261307bf1c5c907a10a050 Mon Sep 17 00:00:00 2001 From: azzayou Date: Thu, 4 Jun 2026 22:19:08 +0100 Subject: [PATCH] make it work there 2 reason it didn't work before First the Attribute `pyray.Matrix2x2` doesn't exist. Second the function `pyray.vector2_transform(v, mat)` prameter `mat` is Matrix 4x4 not 2x2 . And that's it :] --- examples/extra/vector2_extended.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/extra/vector2_extended.py b/examples/extra/vector2_extended.py index 3ba73af..01f484b 100644 --- a/examples/extra/vector2_extended.py +++ b/examples/extra/vector2_extended.py @@ -255,6 +255,6 @@ def zero(): print("Rotate:", v1.rotate(45)) - # I don't know why this not work - # mat = Matrix2x2(1, 0, 0, 1) - # print("Transform:", v1.transform(mat)) + # now it work. :D + mat = matrix_identity() # Matrix 4x4 [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] + print("Transform:", v1.transform(mat)) # (3.0, 4.0)