# SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

 Register FAQ Members List Calendar Mark Forums Read

 25-02-2004, 04:16 PM #1 InvaZimm Subscriber     Join Date: Apr 2003 Location: Florida Posts: 61 Thanks: 0 Thanked 0 Times in 0 Posts Expression HELP I am trying to have a ball follow a motion path (which I have set and working). However, I would also like the ball to rotate on its Z axis as it moves along the motion path. I am having trouble figuring out what node(s) is/are needed to get the values along the motion path to be used to help calculate how the qucikly the ball should rotate. Basically I hope to have the ball speed up on different areas of the curves to similuate a gravity effect. *Note not allowed to use any dynamics or particles in the project.* Thank you for your time.
 25-02-2004, 04:38 PM #2 roach105 Subscriber     Join Date: Dec 2002 Location: T.O Baby! Posts: 1,016 Thanks: 0 Thanked 1 Time in 1 Post Well if you are using Maya 5 you can actually have the ball along the surface speed up and slow down depending on where you have placed te CV for the path. In regards to spinning you can probably create a simple expression on the rotate z channel e.g. pSphere1.rotateZ = time *360;
25-02-2004, 04:47 PM   #3
roach105
Subscriber

Join Date: Dec 2002
Location: T.O Baby!
Posts: 1,016
Thanks: 0
Thanked 1 Time in 1 Post

Here is a playblast of what I did. Is this what you are looking for?

what I did is grouped the Sphere to itself and applyied that group to the motion bath with parametric length turned on. This will tell Maya to actually look at the points on the curve to speed up and slowdown. After I went to the sphere itself and applied the expression on rotate z. Basic expression telling the sphere to turn 360 degrees.
Attached Files
 motionpath.zip (247.9 KB, 13 views)

Last edited by roach105 : 25-02-2004 at 08:15 PM.

 25-02-2004, 04:55 PM #4 Alan Moderator     Join Date: Oct 2002 Location: London, UK Posts: 2,800 Thanks: 0 Thanked 5 Times in 5 Posts there's something in the help docs about this. Your expression wont be acurate roach because it wont take into account gradients of slopes or anything. You need to look at the geometry you're rolling along (or the curve) and use that to drive the rotation of the ball. You could probably base it on distance travelled. Speed = distance /time remember Alan __________________ Technical Director - Framestore Currently working on: Your Highness IMDB
 25-02-2004, 05:00 PM #5 roach105 Subscriber     Join Date: Dec 2002 Location: T.O Baby! Posts: 1,016 Thanks: 0 Thanked 1 Time in 1 Post Very true Pure. That expression is not looking at the curve at all. I actually thought he wanted the ball to speed but he needs the rotation to be affected. My bad Last edited by roach105 : 25-02-2004 at 05:07 PM.
 25-02-2004, 05:43 PM #6 InvaZimm Subscriber     Join Date: Apr 2003 Location: Florida Posts: 61 Thanks: 0 Thanked 0 Times in 0 Posts Interesting. But how do you look at the need attribute(s) of the curve to have it drive the rotation of the ball. __________________ John 'Zimm' Zimmermann Setup Artist http://johnzimmermann.com “Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - A. Einstein
 25-02-2004, 08:06 PM #7 InvaZimm Subscriber     Join Date: Apr 2003 Location: Florida Posts: 61 Thanks: 0 Thanked 0 Times in 0 Posts Thanx guys. Got it to work now, it was something small and stupid. Just passed over it earlier. __________________ John 'Zimm' Zimmermann Setup Artist http://johnzimmermann.com “Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world." - A. Einstein

 Thread Tools

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off

## \$34

Month-to-month billing
 \$34/month Unlimited access to all videos Project files to download Easy to cancel at anytime

## \$87

Billing every 3 months
 \$29/month Unlimited access to all videos Project files to download Easy to cancel at anytime Save \$5 per month or \$15 in total compared to monthly billing with this package.

## \$288

Billing every 12 months
 \$24/month Unlimited access to all videos Project files to download Easy to cancel at anytime Save \$10 per month or \$120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.