PDA

View Full Version : subobject coordinates...


galagast
03-22-2005, 02:09 PM
say i hav a
sphere @ 0,50,50
plane @ 0,75,75

i select the sphere and applied a slice mod, thus ran this code:

$.modifiers[#slice].sliceplane.pos = $plane01.pos


the listener then returns
[-9.49779,75,75]

although im not too worried about how it got "-9.49779"
i was more worried about the value being local to the sphere...
my question is, how do i set a subobject node's transform (in this case, the sliceplane gizmo) using the world coordiantes?
coz using in coordsys world gives me the same result...

Ive attached a grab of the result... I also read the "How are Transformations calculated in 3ds max and MAXScript?" section in the helpfile.. but some parts of it is kinda hard to digest. :sad:

hmmm... i really feel that im missing something really simple... i hope someone cud shed some light to me on this... any help is much appreciated.:)

prettyPixel
03-22-2005, 02:40 PM
I think the gizmo of the modifier receive a relative position.
So if you substact the position of the sphere, the gizmo will have the same position than the plane.

$.modifiers[#slice].sliceplane.pos = $plane01.pos-$.pos

But I don't know if It is enough for your project because I do not really answered your question. :drool:

galagast
03-22-2005, 02:46 PM
waw! that worked! i really need some sleep now! hehe

many thanks prettyPixel!

and i was also reading the thread by namoi, and because of your posts there, i learned to use recursive functions, millions of thanks to you for that. :)

good day!

CGTalk Moderation
03-22-2005, 02:46 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.