I hope this isn't a dumb question, but how do you query the world position of an object in an expression?
CODE
float $get_xfrm[]=xform -q -ws -t p1;
print $get_xfrm;
print "\n";
-t means translation try this
p1 means ploySphere
Well its not necessarily very smart to use xform or any other mel for that matter in a expression. Because then you have no trigger.
Anyway bear in mind that expressions have nothing to do with mel per see, they do however parse mel but that dont work very well for the expression engine because they aren't part of the DG.
k. so what would you suggest?
attach a constrained locator or something to geht the ws-pos from?
well it depends on what you do. BUt yes thats a very viable option. But thing is it can possible solve it without expressions. It depends on whay your up to however.
Well I was trying to change the override color of a controller when a part of my skeleton moved past a certain point from another part.
I could use distancebetween or query the position of constrained locators but those methods were giving me trouble for some reason. Although there were no other connections to these locators, it was propagating transformations that it shouldn't have been.
I was just wondering if there was another method to do something like this.