Notifications
Clear all
[Closed] custom helpers
Page 2 / 2
Prev
Nov 03, 2009 10:10 pm
Using the circle gizmo is there a quick way to rotate the circle rather than making a custom one on the Y axis?
I’ve made a custom one using curves but it seems like the long way to do it considering there is already a basic circle manipulator available.
1 Reply
RTFM? 😈
Each gizmo provides a transform method which can be called with an arbitrary matrix.
So you can pass a rotation matrix if you want it rotated.
local giz = manip.makeCircle [0,0,0] (1.5*size) 32
this.addGizmoShape giz flags yellowColor yellowColor
local giz = manip.makeCircle [0,0,0] (1.5*size) 32
giz.transform (rotateXMatrix 90)
this.addGizmoShape giz flags yellowColor yellowColor
local giz = manip.makeCircle [0,0,0] (1.5*size) 32
giz.transform (rotateYMatrix 90)
this.addGizmoShape giz flags yellowColor yellowColor
Or you can provide any matrix with a row4 to also offset the gizmo from the pivot of the manipulator.
local giz = manip.makeCircle [0,0,0] (1.5*size) 32
theTM = matrix3 1
theTM.row4 = [8.5,0,0]*size
giz.transform theTM
this.addGizmoShape giz flags yellowColor yellowColor
local giz = manip.makeCircle [0,0,0] (1.5*size) 32
theTM = (rotateXMatrix 90)
theTM.row4 = [8.5,0,0]*size
giz.transform theTM
this.addGizmoShape giz flags yellowColor yellowColor
local giz = manip.makeCircle [0,0,0] (1.5*size) 32
theTM = (rotateYMatrix 90)
theTM.row4 = [8.5,0,0]*size
giz.transform theTM
this.addGizmoShape giz flags yellowColor yellowColor
Page 2 / 2
Prev