Notifications
Clear all
[Closed] nodeLocalBoundingBox
Page 3 / 3
Prev
Dec 03, 2011 3:11 pm
Yeah, I saw that I am trying to remember/figure out how to get the pivot rotation.
I’ll do some searching and get back
Dec 03, 2011 3:11 pm
Actually, I just figured out an easier way to do it, and it seems to work perfect
bounds
if (isGroupMember selection[1] == true) then ( bounds= in coordsys local nodeLocalBoundingBox selection[1].parent) else (bounds= in coordsys local nodeLocalBoundingBox selection[1] )
b = box()
bb = bounds[2] - bounds[1]--c.max - c.min
b.width = bb[1]
b.length = bb[2]
b.height = bb[3]
CenterPivot b
--delete c
obj = selection[1]
if (isGroupMember selection[1] == true) then obj = selection[1].parent else obj = selection[1]
tm = obj.objecttransform
if (isGroupMember obj == true) then
(
b.transform = tm
b.pos = obj.parent.center
b.pivot = obj.parent.pivot
)
else
(
b.transform = tm
b.pos = obj.center
b.pivot = obj.pivot
)
Dec 03, 2011 3:11 pm
Although… this method seems to be very slow when trying to use realtime…
Something to do when using objecttransform
Edit: Nevermind, perf wasnt caused by any of that.
Now the only issue is, when using this in mouseTrack, while moving, the box created moves/twitches rapidly aligned/unaligned for some reason.
Dec 03, 2011 3:11 pm
Sorry for all the spam.
I got that last issue solved, it was because my ray was hitting/using the object I didn’t want it to, so it kept moving/updating. Now it doesn’t flicker and works fine
Page 3 / 3
Prev