Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   Expression Problems - Rotating Wheels (https://simplymaya.com/forum/showthread.php?t=11216)

I-Iybrid 31-03-2004 02:10 AM

Expression Problems - Rotating Wheels
 
I have an expression, so whenever I move a wheel on my car, it rotates depending on how far I move it. I assigned it to all 4 wheels (independently) and parented (i also tried grouping them) to the rest of the car. When i move the car, the wheels dont rotate like they should. Any ideas how I would make it so when I move the car, the wheels rotate?

dannyngan 31-03-2004 02:20 AM

Since the wheels are parented to something else, they aren't actually translating in the scene. The parent object (or its parent, etc) is translating, and the wheels are just following in the parent object's coordinate space. To make the expression work, it needs to get the translation of whatever is translating everything. If it's the body of the car, then use that. If it's a group object, use that.

BTW: This isn't really a newbie/basics question. This should go into the programming forum.

I-Iybrid 31-03-2004 03:43 AM

Thnx danny. Ill try and get it figured out. Yea, sorry about that. I didnt really know where to post it, cause to me, it could of gone in either forum. Expressions are brand new to me, so I figured the NewB forum. :)

I-Iybrid 31-03-2004 03:51 PM

For some reason, its still not working. I select the car body, and put in the rotateZ section "wheel.rotateX = time * -300;" and it just turns the wheel a random degree, and nothing else happens. Any suggestions? The name of the wheel is "wheel" and the carbody is "MitsuEVO". Thnx


All times are GMT. The time now is 12:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018