Vex Connect two points with a line
3538
2
0
Dec. 17, 2022 6 a.m.
Hello
I have a problem, I don't understand why I can't connect two points to create a line with vex (ofc it works if i use "add" sop, but i want to use vex) ?
This is my vex :
int points [];
vector max = detail (1 ,"max" );
vector zpos = set (0 ,0 ,max .z );
addpoint (0 ,0 );
addpoint (0 ,zpos );
addprim (geoself (), "polyline" , points );
animatrix_
Member
5278 posts
Joined: Feb. 2012
Offline
Dec. 17, 2022 6:32 a.m.
Hi,
Your points array is empty. You have to populate it with the new point numbers or just pass them directly to addprim:
int points [];
vector max = detail (1 ,"max" );
vector zpos = set (0 ,0 ,max .z );
int pt0 = addpoint (0 ,0 );
int pt1 = addpoint (0 ,zpos );
addprim (geoself (), "polyline" , pt0 , pt1 );
Dec. 17, 2022 7:50 a.m.
Thank you very much