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?

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.

you could also use a dot product

Also @LucasFoxArt if you ever have to map values that don’t both start at 0, you can use Map Ranged Clamped/Unclamped.

Hey there! Thanks a lot for the help :slight_smile: Dividing for 360 was my first try but it didn’t work - problem is, it turned out it wasn’t working because of an error I made.

So dividing for 360 was the correct solution!

There is a node that does that. It takes two ranges and a value. I forgot what its called and was trying to find it myself.

Man the question has already been answered, and is very old too! All you have to do is to normalize it.