Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Maya Basics & Newbie Lounge (https://simplymaya.com/forum/forumdisplay.php?f=31)
-   -   Expression HELP (https://simplymaya.com/forum/showthread.php?t=10617)

InvaZimm 25-02-2004 05:16 PM

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.

roach105 25-02-2004 05:38 PM

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;

roach105 25-02-2004 05:47 PM

1 Attachment(s)
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.

Alan 25-02-2004 05:55 PM

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

roach105 25-02-2004 06:00 PM

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

InvaZimm 25-02-2004 06:43 PM

Interesting. But how do you look at the need attribute(s) of the curve to have it drive the rotation of the ball.

InvaZimm 25-02-2004 09:06 PM

Thanx guys. Got it to work now, it was something small and stupid. Just passed over it earlier.


All times are GMT. The time now is 09:35 AM.

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