Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Mirror object transforms?

Mirror object transforms?

dg3duy
Collaborator Collaborator
1,423 Views
2 Replies
Message 1 of 3

Mirror object transforms?

dg3duy
Collaborator
Collaborator

I want to make a mirror of an object and when I manipulate it I also see the transformations reflected in the copy of the object. Here in this example it only works as a mirror when I manipulate it on a single X axis.
I am totally confused in understanding the operation of matrix3 when using it to generate a copy.
The example code is thanks to DenisT

 (
 	delete objects 
 	
 	origin = box pos:[-30, 10, 10] wirecolor:yellow
 	rotate origin (eulerangles 0 0 45)
 
 	mirrorX = copy origin wirecolor:green
 	tm = origin.transform * (matrix3 [-1,0,0] [0,1,0] [0,0,1] [0,0,0])
 	mirrorX.transform = prescale tm [-1,1,1] 
 )
 


mirror.gif

0 Likes
Accepted solutions (1)
1,424 Views
2 Replies
Replies (2)
Message 2 of 3

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

i guess you want a different effect... try this:

(
 	delete objects 
 	
 	origin = box pos:[-30, 10, 10] wirecolor:yellow
 	rotate origin (eulerangles 0 45 45)
 
 	mirrorX = copy origin wirecolor:green
 	mirrorX.transform = origin.transform * (matrix3 [-1,0,0] [0,1,0] [0,0,1] [0,0,0])
 	resetscale mirrorX 
)

 

Message 3 of 3

dg3duy
Collaborator
Collaborator

Unbelievable! Thank you!

0 Likes