Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 15-04-2003, 02:44 AM   #1
nix21
Registered User
 
Join Date: Jun 2002
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Object placement on a curve no aninimation

I am currently working on a script where I place objects along a curve. This is not for animation, just placement on the curve.

Here is a snippet:

********************

float $pointOnCurve[] = `pointOnCurve -pr $tmp -p ($curveName[0])`;

move ($pointOnCurve[0]) ($pointOnCurve[1]) ($pointOnCurve[2]) ($nameObject[$temp-1]);

*******************

where $nameObject[] is the array containing the objects to be moved onto the curve.

My question is this---How do you get the objects to actually follow the curve, where rotation of object also goes with the curve, not just being placed on the curve?

Mabye this simple pic will clarify:



I basically want it to be like the "follow" commmand when attaching an object to a curve for animaion along the curve, however I don't want the animation.

Hope that's easy enough to understand.

thanks,
Nic
nix21 is offline   Reply With Quote
Old 15-04-2003, 06:25 AM   #2
mark_wilkins
Registered User
 
mark_wilkins's Avatar
 
Join Date: Jan 2003
Posts: 161
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can get the tangent to the curve by calling pointOnCurve with a -t flag, then rotate the objects to orient with that tangent direction.

-- Mark
__________________
Mark R. Wilkins
author of MEL Scripting for Maya Animators
www.melscripting.com
mark_wilkins is offline   Reply With Quote
Old 16-04-2003, 07:02 AM   #3
nix21
Registered User
 
Join Date: Jun 2002
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for the answer Mark. yeah I basically have been trying that and I at least have gotten the rotation working, using tangent constraint.

I actually saw something to that effect in your book with the helic particles around a curve. Great Book by the way, very helpful.

It works perfectly on a two dimensional curve, say in th xz plane, but when pulling up a point in the positive y direction it will cause the object to point outward(say down the z-axis, if the curve was made in the z direction).

-Is there anyway to force the object(say a cone) to remain pointing downward(down the y axis)?

thanks again,
Nic
nix21 is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.