PDA

View Full Version : Expression questions/problems


vrljc
01-22-2003, 03:07 AM
This is a two part problem concerning expressions. The first problem is that I have a Tricycle already rigged so that when the pedals rotate, the entire bike moves accordingly. Pretty simple. However, I want to take this a step further and make the bike automatically turn when the handle bar is turned AND the pedals are rotating, got me?

The second problem (this is somewhat related)is that the tricycle normally moves along the z-axis. When I rotate the tricycle to move along the x-axis, the tricycle will still move along the z-axis when I rotate the pedals. How can I make the tricycle move along both axes based upon the orientation of the bike?

Much help would be appreciated! Thanx!

mohh
01-22-2003, 03:38 AM
I'm just a newbie myself, but I think that the answer to your second question is to use a null to move your object.

vrljc
01-22-2003, 05:40 AM
Maybe I should clarify my rigging. There is (obviously) a crank layer, a front wheel layer, a handle bar layer, tricycle frame layer, a rear wheels layer, and most importantly, a master null. The rear wheels and handlebars are parented to the frame which is parented to the master null. The front wheel and two pedals are parented to the crank which is parented to the master null. Now for the expressions set up:

Basically the crank is the key to the movement. When the crank rotates the bike moves, like a real bike in real life, right? So the master null has an expression in the z-axis that multiplies the rotation of the crank by a value, and thus the bike moves, and everything goes with it, because it is the master parent of every layer. From there there is an expression for the rear wheels to rotate along with the crank, but not to the exact rotation, because the rear wheels are smaller and thus have to rotate faster to keep up with the larger front wheel. Another expression is on the crank itself saying that it will rotate according to the rotation of the handlebars, however much the handlebars rotate, the crank rotates the same. And because the front wheel is parented to the crank, the wheel will also rotate the same amount as the handlebars.

I know that this is a pretty easy set up, but I hope clarifying my set up will help.

mohh
01-22-2003, 11:46 AM
Hmm,

I'd have to recreate a similar setup to play around with to see if this works, but have you tried to parent your Master Null to a Master Rotation Null and just use that for all of your rotations?

uncommongrafx
01-22-2003, 12:22 PM
Not to be a pooper but,
You'll have to disconnect something if you will be using the native expressions: won't work. If you have access to Relativity (http://www.premdesign.com),then you have an answer.
Your better bet is to just have the rotation of the crank and wheels be accurate while you 'other' automate the heading of the tri, i.e., do it by hand. ;)
Seems you get the expressions system rather well. Time to take that next step. :shrug:
Robert Wilson
UnCommon Grafx

CGTalk Moderation
01-14-2006, 06:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.