Stupid Math Question
by Adam Benson
on
Oct 27, 2009 at 12:01:02 am
Some times the simplest math turns out to be the stupidest math in Maya. Here's my problem. I need an equation that takes one value and subtracts it from 90.
float $newValue = (90-$someValue.rotateZ);
Except, that doesn't work. I've tried all kinds of variations of this.
float $newValue;
$newValue=90-$someValue.rotateZ;
Doesn't work. I've tried separating out everything with (). Nope.
I've even tried
$newValue=abs($someValue.rotateZ-90);
Again, Doesn't work. Plus, that's still wrong anyway!
I've also tried
But who cares, that's a different value than I need. I need the value subtracted from 90, so that I can use that value to drive the other main expression. It's burning my freakin' brain!
Does anyone know how to subtract the rotation of one object from 90 to get a usable result? This should be working, but isn't. Of all the stupid things!!
The end result is supposed to work like what I imagine this would.
$gearRemain = 90 - landingGearLf.rotateZ;
landingGearRt.rotateZ=landingGearLf.rotateZ+$gearRemain;
Real simple. Doesn't work.
Thanks in advance for your help.
Adam Benson
Visual Effects Artist/Musician/Sound Engineer/Editor
http://www.SleepDeprivedProductions.com
http://www.SleepDeprivedFilms.com
Re: Stupid Math Question by Adam Benson on Oct 27, 2009 at 12:11:53 am
Nevermind. Came up with a whole new solution, that has nothing to do with this equation. Although, I'd still like to know why this simple math doesn't work.... if anyone knows.
Thanks again,
Adam
Adam Benson
Visual Effects Artist/Musician/Sound Engineer/Editor
http://www.SleepDeprivedProductions.com
http://www.SleepDeprivedFilms.com