-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rotate image #5
Comments
and how to rotate the image so that it always face to the camera view point? |
It's also possible to rotate X and y at the same time |
if you want face to the camera view,you need calculate. |
i had a position (X,Y,Z) can show you me function or formula to get rotate camera view to face. |
I have to provide you with the method, that method can calculate their own rotation angle. |
(GLKVector3)CalculateSphereSurfacePointWithLat:(float)lat Lon:(float)lon Depth:(float)depth GLKVector3 Y_Z; if (lat == 0.0) { if (lon == 0.0) { GLKVector3 dir = [MathC vector3Normalization:GLKVector3Add(X_Z, Y_Z)]; return point; // 规格化 (GLKVector3)vector3Normalization:(GLKVector3)vec3 return GLKVector3Make(tempx, tempy, tempz); |
is those method ? |
yes. |
you use CalculateSphereSurfacePointWithLat method whitch i provide,then you need rotate it by using - (void)setRotate:(float)radiansX radiansY:(float)radiansY radiansZ:(float)radiansZ; |
when i set long is 0 and lat is 90 ,it mean on the middle top. but image still not rotate all to face , just a part |
if your lon is 0 ,lat is 90 and depth is 45, then you can try : setRotate:lat radiansY:-lon radiansZ:0; |
maybe you wrong , we use CalculateSphereSurfacePointWithLat to calculate for rotate as you told above, why after calculate , you don't use them ? |
rotate when i just add radianX image will rote up down,
radianY will rotate left right
but if I add two in same image will be wrong, you can try with your rotate demo change radianY 0 to 50,-50
The text was updated successfully, but these errors were encountered: