Help Rotating A Matrix

What piece of code do i use to rotate a matrix??

ie

Translate a matrix is transMatrix
Scale a matrix is scaleMatrix

whats rotate??

Thanks

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barigazy's picture

Read this topic

Read this topic http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=fil...
U can use PreRotate matrix3 quat

barigazy

Shade926's picture

I suck at matrixes

I added the prerotate to this piece of code:

local mymatrix = matrix3 1
spinner spn_spinnerx "X Amount"
spinner spn_spinnery "Y Amount"
spinner spn_spinnerz "Z Amount"
button translate_matrix "Translate Matrix"
on translate_matrix pressed do
(
mytransM = transMatrix [spn_spinnerx.value, spn_spinnery.value, spn_spinnerz.value] -----Here i need help i think
mymatrix = mymatrix*mytransM
format "mymatrix = %\n" mymatrix
)

button scale_matrix "Scale Matrix"
on scale_matrix pressed do
(
myscaleM = scaleMatrix [spn_spinnerx.value, spn_spinnery.value, spn_spinnerz.value] -----Here i need help i think
mymatrix = mymatrix*myscaleM
format "mymatrix = %\n" mymatrix
)
button rotate_matrix "Rotate Matrix"
on rotate_matrix pressed do
(
myrotateM = preRotate [spn_spinnerx.value, spn_spinnery.value, spn_spinnerz.value] -----Here i need help i think
mymatrix = mymatrix*myrotateM
format "mymatrix = %\n" mymatrix
)

It is within a rollout but still chucks back an error when i try to do the rotate matrix???

Thanks for all your help!!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.