Converting 0-360 rotation to 0-1 rotation
Hey guys, Recently I've encountered a problem with a dynamic instance material. I have a material set to work on world position, but I also have a custom rotator to rotate the texture when I rotate the actor using it (in the construction script I simply created a dynamic instance material and changed the rotation parameter of the material with a "get actor rotation" node. With some workarounds I can make it more or less functional - but it's terribly buggy.
The main problem is that the actor rotates from 0 to 360, while the CustomRotator node requires a 0-1 value. Is there any node capable of translating a 0-360 actor rotation to a 0-1 rotation value?
asked Apr 11 '19 at 04:08 PM in Blueprint Scripting
Just divide the value by 360. That will give you a balue between 0 and 1. Another thing tou can look into is nodes that say normalize, for example theres a normalize to range which takes in a float and outputs a 0-1.
answered Apr 11 '19 at 08:27 PM
you could also use a dot product
answered Apr 11 '19 at 11:35 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here