PDA

View Full Version : Particles emitting towards a locator?


SJames
10-18-2004, 07:15 PM
I want to make laser shots that I have easily changible. If I have an emitter emitting particles, can I use a locator or something else to make it emit towards that locator through an expression? This way I can just move the locator and it will emit to that direction.

I'm using maya 6.01 unlimited btw.

Thanks for ANY help!

Stephen James

surfer3d
10-18-2004, 10:10 PM
Here's a simple expression to do what you were looking to do. I assumed you were using a directional emitter, so these expressions only work with that type. Simply put this expression into your scene.

EMITTERNAME.directionX = LOCATORNAME.translateX;

EMITTERNAME.directionY = LOCATORNAME.translateY;

EMITTERNAME.directionZ = LOCATORNAME.translateZ;

Make sure to replace the EMITTERNAME and LOCATORNAME with the appropriate names for your scene.

If this isn't quite what you're looking for, feel free to reply and I'll see if I can help more. Enjoy!

SJames
10-18-2004, 11:41 PM
hmm I tried just putting that (with the proper names) into the command line and also putting an expression on directionX,Y,Z, in the emitter channel box and I get the same error back.

'Error: Invalid use of Maya object "locator1.translateX".'

or when I put it in an expression I get:

'Error: An execution error occured in the expression expression1'

Maybe you could try it in a simple scene with one dir emitter and one locator and send it to me? I don't know what i'm doing wrong.

stephenjames@gmail.com if possible.

thanks for your help.

surfer3d
10-19-2004, 12:59 AM
Here's a scene file for you, hope that does the trick!

http://sfdm.ca.scad.edu/vsfx/student/tasmith/laserDemo.ma

SJames
10-19-2004, 01:35 AM
link doesn't work :( .. maybe try my email? the school firewall might be blocking it.

thanks again man

surfer3d
10-19-2004, 03:31 AM
should work now, the link got messed up with an extra http:// above... fixed it though... good luck!

Aneks
10-19-2004, 06:45 AM
just make a directional emitter and use an aim constraint !

ie select the locator and then shift-select the emitter and go to constaints => aim

just make sure that your aim vector and emitter directon ae the same

SJames
10-19-2004, 04:32 PM
thanks guys! both gave me exactly what I want!

Thaaaaaaaanks!

CGTalk Moderation
01-19-2006, 02:00 PM
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.