- Home /
 
 
               Question by 
               drina7e · Dec 04, 2011 at 08:59 PM · 
                directionorientationupright  
              
 
              keeping objects upright in world space
I would like to keep certain objects upright (or another orientation) in world space at certain times.
LookAt(target, Vector3.up);
is perfect for the camera, but these objects won't be looking at any object in particular. They will have a position and direction determined, but the orientation is taxing to calculate sometimes, it would be much easier to have a function such as:
SetUpDirection(direction);
and the object would orient itself right way up with respect to direction, just how LookAt() does it.
Sorry if this has been asked before, thanks for help =)
               Comment
              
 
               
              Your answer