C3DObject::LookAt

Top  Previous  Next

Syntax:

 

LookAt(float  x, float  y, float  z)

 

Purpose:

Orients the object towards a point in 3D space.

 

Parameters:

x,y,z - The point in world space to look at.

 

Returned value(s):

None.

 

Application:

VECTOR3 v
v = mesh1.GetPosition(TRUE)
mesh2.LookAt(v.x,v.y,v.z)

 

Class Hierarchy

C3DObject

 

Additional Info:

This method reorients the object so the directional vector points at the look at point, performing the necessary rotations. When an object is first created it is assumed to have a directional vector of 0,0,1 or facing away from the viewer.

 

See Also:

Orient