Author Topic: Align camera perpendicular to an object  (Read 981 times)

Offline julycamara

  • byte
  • *
  • Posts: 10
    • View Profile
Align camera perpendicular to an object
« on: August 11, 2014, 10:45:38 am »
Hello,

I have a "floor" for my scene made of 800 triangles that are doing a big rectangle. Always i are trying to align the camera manually, but i want to know if there is a method for align the camera on 90 degrees over my object and center. is it possible?

Thank you very much.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12011
    • View Profile
    • http://www.jpct.net
Re: Align camera perpendicular to an object
« Reply #1 on: August 11, 2014, 08:52:30 pm »
There's no method to do this in one step. You could place the camera at the transformed center of the plane, reset it's rotation (Camera.getBack().setIdentity();) and rotate it PI/2 down around X or something like that.