Parameters
vectorPosition
node reference.
Optional. Specfies a world relative vector that hints at where the object's up vector
vectorUp
should point. If this parameter isn't specified, then
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
command only uses the
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
model, using
pointAt
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
same node.
•
Remove your scale prior to using
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 (
within a hyperlink in the text sprite. Typically, the point used is the cursor position. This is useful
for setting custom cursors.
458
Chapter 12: Methods
Required. Specifies the world relative position. This value can also be a
do not need to be perpendicular to each other being as this
vectorUp
parameter as a hinting vector.
vectorUp
will likely cause unexpected non-uniform scaling. This is due to the order
pointAt
TRUE
defaults to using the world's y axis as
pointAt
pointAtOrientation
pointAtOrientation
, and then reapply it afterwards.
or
) that indicates whether the specified point is
FALSE
on the same node, e.g., a
together on the
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers