730
worldPosition
Syntax
member(
whichCastmember
).model(
whichModel
).worldPosition
member(
whichCastmember
).light(
whichLight
).worldPosition
member(
whichCastmember
).camera(
whichCamera
).worldPosition
member(
whichCastmember
).group(
whichGroup
).worldPosition
Description
3D property; allows you to get and not set the position of the specified node in world coordinates.
A node can be a model, group, camera, or light. This property is equivalent in result to using
getWorldTransform().position
command. The position of a node is represented by a
vector object.
Example
This statement shows that the position of the model named Mars, in world coordinates, is the
vector (-1333.2097, 0.0000, -211.0973):
put member("scene").model("Mars").worldPosition
-- vector(-1333.2097, 0.0000, -211.0973)
See also
getWorldTransform()
,
position (transform)
worldSpaceToSpriteSpace
Syntax
member(
whichCastmember
).camera(
whichCamera
).worldSpaceToSprite\
Space(
vector
)
Description
3D command; returns the point within the camera’s rect at which the world-relative position
specified by
vector
would appear. The position returned by this command is relative to the
upper left corner of the camera’s rect.
If the position specified is out of view of the camera, this command returns
void
.
Example
This statement shows that the world origin, specified by vector (0, 0, 0), appears at point
(250,281) within the camera’s rect:
put sprite(5).camera.worldSpaceToSpriteSpace(vector(0, 0, 0))
-- point(250, 281)
See also
spriteSpaceToWorldSpace
,
rect (camera)
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...