   trigonometry question
  I'm trying to do something like a curved wall, made off of bricks (some OBBB's). I managed to put them in an arc of a circle path, but I fail to determine the angle by which I should rotate them to make them look at the center of the circle.I'd appreciate any help.   
  If you have the position of each brick, you can use an arctangent to find the angle. In C++, rad = atan2(y, x) does the trick for you.   ;  Yep, what you do is get a vector from the center of the brick to where you want them to point.That will give you an X,Y,Z vector.Drop whatever the vertical (height) component is.  For instance, say that Z is up, so drop Z from your 3d vector to get an X,Y vector.Use atan2(Y,X) to get the angle of the brick.Depending on the orientation of the brick model itself, you may need to rotate it 90 degrees after this if it's pointing the "long way" at the point.   ;  I might be tired or just plain dumb, but it doesnt work.Here's my code:for(int i = 0;i < 90;i += 10){  float d = i * M_PI/180.f;  OBB *obb = new OBB();  obb->set(Vector(cos(d) * 30, 0, -sin(d) * 30), Vector(2, 2, .1f));//sets the OBB's position and size  obb->rotate(atan2f(obb->position().y, obb->position().x)*180.f/M_PI, Vector(0, 1));//rotates the OBB using angle and axis  obbs.push_back(obb);  }}What am I missing?   ;  Whats it do when that code runs?EDIT: also, in your world, is Y the UP vector?If so your atan2 should be like this:obb->rotate(atan2f(obb->position().z, obb->position().x)*180.f/M_PI, Vector(0, 1));//rotates the OBB using angle and axisNotice it's using position.z not position.y   ;  obb->rotate(atan2f(obb->position().x, obb->position().z)*180.f/M_PI, Vector(0, 1));Now it works. Thanks a lot.   ;  Awesome! NP (:   