Jump to content

Set Always in vector parameters


BOON

Recommended Posts

kind of,

set parm to Set Always and put the values you want to x and z but to y write $<parmname>

so if the parm tuple is called vel then put $vely in vely parm to reuse actual value and hence behave like it was Set Never

to really get Set Initial behaviour you would need to initialize it on the first frame, so it would be like if($SF==1, 10, $vely)

Link to comment
Share on other sites

maybe what you said is not what I should be doing for my case, or I'm missing something out. So here's my example file.

I'm trying to set my constraint position x and z to "set always" because it's a deforming geo, but I want y to "set initial" so it would fall accordingly. From the info you provided in the earlier post, I came up with if ($F==1, ch("../objectposy"), $worldspaceposy), but it still behaved like "set always".

Could you please tell me what am I doing wrong here?

deform_constraint_setalways.hipnc

Link to comment
Share on other sites

according to what you've written you used it correctly and it indeed does Set Always for X and Z and Set Initial for Y

so if you explore details view you should notice that X and Z are updated every frame (if changed) and Y is not, since it is just set on $F == 1 and then just reused the previous value ($SF might have been better, but it's the same for this case)

the other thing is that, from your file is apparent that you are deforming only in X axis, so if you are taking the centroid from each piece, only X value will change

in that case, Y will remain static even without imitating the Set Initial mode (btw there is centroid() function so you can simplify averaging bbox() extremes with that)

I'm a little puzzled from what you are expecting and how you want your constraints to behave

you need to understand that bbox or centroid from the piece Geometry data will return in local space and that's why only X axis is updating, and Y is set to the same value, so it's pointless if it's Set Always or Set Initial, result is the same

also Set Always and Set Initial for that position doesn't meant that it will not be constrained in that axis, it will simply either update the value or not (in this case position of the constraint)

so if you want to update Y to actual world position you can try getting piece position data directly (instead of just local Y centroid), in which case it will stop being constrained in Y axis, but the result may not be what you are expecting

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...