Jump to content

Expressions vtorigin, and xyz question


Recommended Posts

Hello, 

 

I have a question regarding a syntax in this expression or any other similar:

vrorigin("", "/obj/sphere_object")[0]

 

At the end of the expression we have [0] or [1] and [2], and it means xyz axis, but... There is completely no information about this bracket in Houdini help under vorigin.  :wacko: Some of the expressions have a number inside main function after comma.  How can I know that? Is there any information about this [  ] brackets? I see there is some inconsistency in Houdini what makes learning difficult.

Link to comment
Share on other sites

Generally in programming [] mean it's a list or an array.

From the description, the function returns a vector and by using [0] your basically saying I want from this vector the value at index 0,  which would be the x axis.
Where other functions often return a more specific value instead of the whole vector.

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.

Guest
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...