Implicit cast ?
12556 3 2-
- _Christopher_
- Member
- 767 posts
- Joined: April 2014
- Offline
-
- bonsak
- Member
- 459 posts
- Joined: Oct. 2011
- Offline
Hi
If you cast a vector to a float in VEX, Houdini will use the first value of the vector and set the float to that:
It only issues a warning, so you can basically ignore this. But if you want to get rid of this warning you should tell VEX what value from the vector you want to use like this:
Cheers
Bonsak
If you cast a vector to a float in VEX, Houdini will use the first value of the vector and set the float to that:
v@myvec = {1,0,0};
f@myfloat = @myvec;
// myfloat will be set to 1
v@myvec = {0,1,0};
f@myfloat = @myvec;
// myfloat will be set to 0f@myfloat = @myvec[0];
// myfloat will be set to the first value of the vector myvec
Cheers
Bonsak
Edited by bonsak - July 10, 2016 18:23:52
-
- _Christopher_
- Member
- 767 posts
- Joined: April 2014
- Offline
-
- bonsak
- Member
- 459 posts
- Joined: Oct. 2011
- Offline
-
- Quick Links


