Is it possible to get object rotation or space orientation?
I would like to know what is current object orientation / rotation in space and then based on this data I would like to change the color of this arrow. Is it possible to do?
I tried to use the UV pointer to get information when an object is, for example, turned down or down. But it works quite badly.
point UV = transform("object",point(u,v,0)),
In fact I would like to build similliar shader like I have in Blender:
In Blender, Vector Transform works perfectly.
I wrote simple shader:
and partially it works, but its space-dependent colorization, not rotation.
x = Pos-vec-UV; y = Pos-vec-UV; z = Pos-vec-UV;
This code is "brute force testing", but at this moment it works quite close to this what I would like to achieve.