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

**int $ninty = 90;**

float $newValue;

$newValue = $ninty - $someValue.rotateZ;
The only thing that works is

**$newValue = $someValue.rotateZ - 90;**
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