mimbik Posted March 16, 2016 Share Posted March 16, 2016 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. 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. Quote Link to comment Share on other sites More sharing options...
Maurits Posted March 16, 2016 Share Posted March 16, 2016 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.