Notifications
Clear all
[Closed] Flip Matrix on X and Y Axis in World Space
Nov 18, 2015 8:30 pm
What is an easy way of flipping a matrix on the X and Y axis in world space?
2 Replies
Nov 18, 2015 8:30 pm
Try this: multiply each vector in the matrix by [-1,-1,1].
p = point()
p.rotation = (random (quat -1 -1 -1 0) (quat 1 1 1 1))
p.pos = [(random 0.0 50.0),(random 0.0 50.0),(random 0.0 50.0)]
m = p.transform
r = [-1,-1,1]
mi = (matrix3 (m[1]*r) (m[2]*r) (m[3]*r) (m[4]*r))
p2 = point()
p2.transform = mi
Nov 18, 2015 8:30 pm
Thanks Richard, that is what i ended up doing. I was not sure if there was a better way of doing this since it’s results in a negative transform. But then i just realized i can correct that afterwards.
Thank you.