andian0214 Posted September 5, 2019 Share Posted September 5, 2019 how to read the fourth value in vex Quote Link to comment Share on other sites More sharing options...
ikoon Posted September 5, 2019 Share Posted September 5, 2019 Hi, it should be f@aaa = p@cost[3]; p@cost is vector4 Quote Link to comment Share on other sites More sharing options...
anim Posted September 5, 2019 Share Posted September 5, 2019 also p@cost.w or p@cost.a 1 Quote Link to comment Share on other sites More sharing options...
andian0214 Posted September 5, 2019 Author Share Posted September 5, 2019 thanks guys ,but if i have fifth ,the ‘p’ can only read the fourth Quote Link to comment Share on other sites More sharing options...
anim Posted September 5, 2019 Share Posted September 5, 2019 then use array for cost instead of float5 if your cost attribute was float array, then you can use f@a = f[]@cost[4]; if for some reason you have to keep it float5 then you can sample the value like this for example float cost[] = point(0, "cost", @ptnum); f@a = cost[4]; 1 Quote Link to comment Share on other sites More sharing options...
andian0214 Posted September 5, 2019 Author Share Posted September 5, 2019 1 hour ago, anim said: then use array for cost instead of float5 if your cost attribute was float array, then you can use f@a = f[]@cost[4]; if for some reason you have to keep it float5 then you can sample the value like this for example float cost[] = point(0, "cost", @ptnum); f@a = cost[4]; cool it works thanks 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.