View Full Version : Position script: help?

10 October 2009, 02:16 AM
Could someone help me with this script

I have a position expressed like this:


it is actually (xzy)

and I want to apply it to an objects position like this (xyz) with 2 more decimal places:


so I paste this text 'somewhere': 37.951,-0.3586614,22.54945
and magically I get this as my current position: 3795.1,2254.945,-035.86614

Is that possible?? yes! :)

10 October 2009, 02:48 AM
[that didnt work...]

10 October 2009, 12:39 PM
thePos = [37.951,-0.3586614,22.54945]
selection[1].pos = [thePos.x *100, thePos.z *100, thePos.y *100]

Does that help?


10 October 2009, 01:43 AM
thanks JHN - that really does help

Im obviously not good at max script ;) - and I couldnt find how to explicitly set a pos (only to move a certain amount)

yesterday I had a programmer take some time to add a feature to our little engine (which was expressing positions in an unfriendly way for me)

You see a lot of things in our engine were created using copy and paste in the engine (I hate that - no historical file to draw from) - and I had to rebuild the pos of about 200 objects in max (yah)

So in short right click on the obj in the engine choose 'generate max command' and this is saved to the clipboard:

move $ [ 5340.9853515625, 2011.98010253906, 771.108581542969 ]

so as long as I have the object at the origin in max - thatll work.

but maybe now I can tweak that to include your explicit position - or even rewrite it to include a paste field that'll plop it into pos automatically ^^

thanks again!

this is me - rebuilding copy pasted beam positions (jealous?) ;)

CGTalk Moderation
10 October 2009, 01:43 AM
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.