View Full Version : Expression Question - passing Vector components to an Expression from a Subexpression

Mike Pauza
10 October 2004, 04:17 PM
Hi guys.

I need to define a vector in one expression, then pass one component of it to another expression. From the limited docs, i'm thinking that passing "the 3" from vectorXYZ to vectorZ should work like this:

Name: vectorXYZ
Value: < 1, 2, 3>

Name: vectorZ
Value: [vectorXYZ].z

What am I doing wrong? Any help is much appreciated.


10 October 2004, 01:17 AM
Can't figure it out myself, but <1, 2, 3>.z will return "3", so can you just include the full expression instead of referencing the other one?

Mike Pauza
10 October 2004, 05:05 PM
That's kind of what I wound up doing (see below)...writing a bunch of subexpressions that will be called ( like [vectorZ] for example ) by the main expressions. That takes more writing work than I'd like, but winds up working just fine. :)

Name: vectorX
Value: 1

Name: vectorY
Value: 2

Name: vectorZ
Value: 3

Value: vmag( [vectorX], [vectorY], [vectorZ] ) ***Edited this cause I left out the brackets

Thanks Kretin! -Mike

10 October 2004, 12:10 AM
Good solution Mike :)

CGTalk Moderation
01 January 2006, 12: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.