iphone - How to get X,Y,Z rotations of vertices on a sphere at the origin? -


Hey, I have a field in the world of my game, and I want to keep a plane for each dipping on each area in this area. Purposes. The planes should be centered so that they lie flat against the area (perpendicular to the objects) lie. The area is located in the original, so all the corners are related.

If I think my mind is right then I should be able to do this that the position of the vertical and some simple trigonometry I have tried some combinations, but there is no happiness yet. I appreciate some help on this. Thank you.

Here's my code:

  float xRot = RADIANS_TO_DEGREES (sinf (vertex.x / PLANET_RADIUS)); Float yRot = RADIANS_TO_DEGREES (coffee (Vertex. / PLANET_RADIUS)); Glottef (exciter, 1.0, 0, 0); Glottaffe (yRot, 0, 1.0, 0);  


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -