Hello;
How could I move a specified point along it's Normal, using point wrangle?
Here is my scene :
VEX: How could I move a point along Normal?
17935 4 1- Masoud
- Member
- 407 posts
- Joined: Aug. 2015
- Offline
- tamte
- Member
- 8521 posts
- Joined: July 2007
- Offline
- Masoud
- Member
- 407 posts
- Joined: Aug. 2015
- Offline
- jsmack
- Member
- 7737 posts
- Joined: Sept. 2011
- Offline
You're using pointattrib and setpointattrib wrong. If you are running over points, then you can just bind. You are also using the wrong signature of chf. use float chf( string ) not float chf( string, float ). The signature you are using is to specify the point in time of an animated channel from which to sample the parameter.
@P += @N * chf('dist');
pointattrib is the old way of getting a point attribute, it is only used if you need the know whether the import was successful. Use point() if you need to get a value from a point other than the current one (or from a different input). Remember, an attribvop set to ‘runover points’ is already a loop. The code block is the code executed per ‘iteration’ of the loop, which for points is per point. Any bind (@varname) will refer to the current point's attributes to read or write.
setpointattrib is used for when you need to write the value to a point other than the current point. Generally it should never be used when run-over is set to points, as you already have a point to write to, the current point. The exception to this rule is when creating geometry per-point, and you need to set attributes of newly created points. Other cases are when you don't know the name of the attribute to be written in advance, but this can be handled in different ways.
@P += @N * chf('dist');
pointattrib is the old way of getting a point attribute, it is only used if you need the know whether the import was successful. Use point() if you need to get a value from a point other than the current one (or from a different input). Remember, an attribvop set to ‘runover points’ is already a loop. The code block is the code executed per ‘iteration’ of the loop, which for points is per point. Any bind (@varname) will refer to the current point's attributes to read or write.
setpointattrib is used for when you need to write the value to a point other than the current point. Generally it should never be used when run-over is set to points, as you already have a point to write to, the current point. The exception to this rule is when creating geometry per-point, and you need to set attributes of newly created points. Other cases are when you don't know the name of the attribute to be written in advance, but this can be handled in different ways.
- Masoud
- Member
- 407 posts
- Joined: Aug. 2015
- Offline
-
- Quick Links