Jump to content

Can't access components of a vector with point()?


Recommended Posts


Learning VEX and this is simply out of curiosity since I'm trying to build an intuition for how houdini works under the hood.

I know I can read a vector from say point 5, like so:

vector test = point(0, "P", 5);
printf("%f", test);


Is there a way I can directly access only a component, like P.x with the point function?

To my surprise, substituting "P" with "P.x" doesn't work, i.e:

float test = point(0, "P.x", 5);
printf("%f", test);



I know I can access it via variable indices in the first example like

vector test = point(0, "P", 5);
printf("%f", test[0]);


but it doesn't seem to work within the function. Neither "P.x" nor "P[0]" works. Is there a good reason for this?

Grateful for any input you may have!


Edited by gazegaze
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...