User Guide
458 Chapter 12: Methods
Parameters
vectorPosition
Required. Specifies the world relative position. This value can also be a
node reference.
vectorUp Optional. Specfies a world relative vector that hints at where the object’s up vector
should point. If this parameter isn’t specified, then
pointAt defaults to using the world’s y axis as
the up hinting vector. If you attempt to point the object at a position such that the object’s
forward vector is parallel to the world’s y axis, then the world’s x axis is used as the up
hinting vector. The direction at which you wish to point the object’s forward direction and the
direction specified by
vectorUp do not need to be perpendicular to each other being as this
command only uses the
vectorUp parameter as a hinting vector.
Example
This example points three objects at the model named Mars: the camera named MarsCam, the
light named BrightSpot, and the model named BigGun:
thisWorldPosn = member(“Scene”).model(“Mars”).worldPosition
member("Scene").camera("MarsCam").pointAt(thisWorldPosn)
member("Scene").light("BrightSpot").pointAt(thisWorldPosn)
member("Scene").model("BigGun").pointAt(thisWorldPosn, \
vector(0,0,45))
If you use non-uniform scaling and a custom pointAtOrientation on the same node, e.g., a
model, using
pointAt will likely cause unexpected non-uniform scaling. This is due to the order
in which the non-uniform scaling and the rotation to properly orient the node are applied. To
workaround this issue, do one of the following:
• Avoid using non-uniform scaling and non-default pointAtOrientation together on the
same node.
• Remove your scale prior to using pointAt, and then reapply it afterwards.
For example:
scale = node.transform.scale
node.scale = vector( 1, 1, 1 )
node.pointAt(vector(0, 0, 0)) -- non-default pointAtOrientation
node.transform.scale = scale
See also
pointAtOrientation
pointInHyperlink()
Usage
-- Lingo syntax
spriteObjRef.pointInHyperlink(point)
// JavaScript syntax
spriteObjRef.pointInHyperlink(point);
Description
Text sprite function; returns a value (TRUE or FALSE) that indicates whether the specified point is
within a hyperlink in the text sprite. Typically, the point used is the cursor position. This is useful
for setting custom cursors.