The viewLookAt command positions the specified camera so it is looking at the centroid of all selected objects. If no objects are specified the camera will look at the ground plane.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
position (pos) | float, float, float | ||
|
Derived from mel command maya.cmds.viewLookAt
Example:
import pymel.core as pm
import maya.cmds as cmds
# Create a new camera
cam = pm.camera()
camera = cam[0]
pm.viewLookAt( camera, pos=(0.0, 1.0, 0.0) )