symek Posted February 4, 2007 Share Posted February 4, 2007 This must be simple but can't find the answer I would like to get vector attrib from other SOP, just to compute vlenght or something similar - but "point expression" retrieves only one of vector value. How to get attrib if it's a vector? I tried to make new float attrib with proper expression using vector as input but this doesn't work either. thanks for help, sy Quote Link to comment Share on other sites More sharing options...
edward Posted February 5, 2007 Share Posted February 5, 2007 In hscript, yeah it's pretty unwieldy. You basically need to call point() 3 times for each component. Quote Link to comment Share on other sites More sharing options...
B.Walters Posted February 5, 2007 Share Posted February 5, 2007 (edited) it's either: length( point("/obj/mynode", $PT, "v", 0), point("/obj/mynode", $PT, "v", 1), point("/obj/mynode", $PT, "v", 2)) or length( vector3( point("/obj/mynode", $PT, "v", 0), point("/obj/mynode", $PT, "v", 1), point("/obj/mynode", $PT, "v", 2))) I forget if length() requires a vector or 3 floats as the argument... Edited February 5, 2007 by B.Walters Quote Link to comment Share on other sites More sharing options...
symek Posted February 5, 2007 Author Share Posted February 5, 2007 Ok, thanks! I suspected this just wanted to be sure. Gonna make it in VEX instead. cheers, sy 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.