Hi!

It's slightly hard to explain what I'm looking for. But in general I need to find offset of rotation on one axis between 90 degrees angles. I need this to slightly rotate RayCast when the parent is on the curve (to better detect objects or obstacles on the curved route).

I've made this silly animation to explain it better :D

enter link description here

And here is screen of example route with raycast and red arrow showing vector of movement:

The best for me will be getting this value between -1 and 1:

like this:

rotation 00 deg = 0

rotation 45 deg = 1

rotation 90 deg = 0

rotation 135 deg = 1

rotation 180 deg = 0

and so on...

rotation 00 deg = 0

rotation -45 deg = -1

rotation -90 deg = 0