I have 2 vector points(one of them belongs to object meaning that it also has orientation axis which means that it also has local space) and a float angle in radians.
The 1st point has orientation. It’s the origin of this mechanism.
The 2nd point is a fake vector point in world space. It’s just an imaginary particle. It has no orientation or other parameters which often belongs to ordinary objects.
I need to rotate the 2nd point around 1st point. I have the rotation value. I must rotate it around objects X axis. This image may help to understand the situation:
As you can see, I must actually change the position of particle as if it would change if I rotated the object around the origin by the exact angle. It must be rotated only around single exact axis(in this case it’s X). The origin shouldn’t be changed in any way. In the result I need world position of the vector.
Wait, I could actually use the object space as a world for the particle. In this case I need to know how to convert object space to local space(a point relative to an object). I know that it has something to do with orientation matrices, but I’m not sure about the full workflow.
Thanks everyone.
I’ll try MarcoIT’s no-empties version. It should work well. And than I’ll use BluePrintRandom’s last equation to convert to worldspace. Hopefully will work;)
rotation_x = mat([[1, 0, 0], [0, cos(a1), sin(a1)], [0, -sin(a1), cos(a1)]]) - found it being easier for me to just make a matrix:D a1 = the rotation angle around x axis
Problem solved!