script controller

hi there

could somebody write me a script that doesn't allow me to move an object below 0.0 in Z when I move it in viewports? (world cordinates)

I think this is the kind of script to place in the Z Position track from the motion panel, isn't it?

thanks a lot!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vini87's picture

Review

thanks your website is useful
WhatsApp Windows

Aline3D's picture

:o) You know the float

:o)

You know the float limit?

This is good for tha some cases... maybe is a problem if the object there is a parent.

But... good luck ;) 

AlineLima
Script Developer - SeagullsFly
www.seagullsfly.com
Brasil

metro's picture

Alineeeeeeeeeeeeeeeeeeeeee!!!

Alineeeeeeeeeeeeeeeeeeeeee!!! I love you buddy!!!

it works!!!

I only had to activate the "average weights" option cos the obejct was moving twice the amount it should, because of the two controllers in the List I guess.

I really apreciate your help, but i'm still not really satisfied whith this, i think that there must be a more easy/simple and "elegant" way of doing this. I'll keep trying ;)

Many many thanks Aline, I.O.U a paella ;)

Aline3D's picture

humm... I understand. Try

humm... I understand.

Try this:


1 -
Put a Float List in Z_Position;

 


2 -
Put a Float Script in first controller and write:

if ((in coordsys world $Box01.controller[1][3][2].value)<0.0) then in coordsys world $Box01.controller[1][3][2].value = 0

else in coordsys world $Box01.controller[1][3][2].value = in coordsys world $Box01.controller[1][3][2].value

 


3 -
Put a Bezier Float in second controller (avaliable);

 


4 -
Make the second controller as active controller.

 

AlineLima
Script Developer - SeagullsFly
www.seagullsfly.com
Brasil

Aline3D's picture

Try this in Script

Try this in Script controller: 

in coordsys world $Object_name.pos.z = 0

AlineLima
Script Developer - SeagullsFly
www.seagullsfly.com
Brasil

metro's picture

hi Aline. thanks for your

hi Aline. thanks for your reply ;)

actually, I already have my script working:

    if($Box01.pos.z<0.0) then($Box01.pos.z=0.0)

    $Box01.pos.z

the problem is that every time a release the object and click it to move it again, it inmediatly jumps to z=0.0 even if a leaved it at z=100.0

please, launch Max create a box and try it by yourself, you'll see what i'm talking about.

I'm attaching the script as a Float script to the Z Position track. Am I doing something wrong? I'm using Max 8

thanks!

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.