Hi,

i need to rotate some entities around a dircection given through a vector in the global coordinatesystem. I want to rotate with the angle alpha_w in degree. Here my code:

ang_add(you.pan,vector(alpha_w*vec_normal.z,-alpha_w*vec_normal.y,alpha_w*vec_normal.x));

But this doesnt work. After Rotation, the entity has a wrong orientation relatet to the given rotationvector. I also tried ang_rotate, but with the same result.

Whats wrong with this? I just did it like in the manual.

Thanks


Version: A8 free
OS: Windows 10