[Top] [All Lists]

Re: getting a model's y coordiante

Subject: Re: getting a model's y coordiante
From: "Andrew Morton"
Date: Tue, 19 Feb 2008 09:13:10 -0000
Newsgroups: macromedia.director.basics
midget35 wrote:
> put member("3dmember").model("car").worldPosition
> -- vector( 1,0,2)
> How can I then ask for only the y value to be returned as an integer?
> Sorry if I'm missing the point - I truly appreciate your expertise

A vector has x, y and z properties, so you want

Vectors are made with "floats"; to get an integer you can use bitor:-

put a
-- vector( 1.0000, 2.0000, 3.0000 )
put a.y
-- 2.0000
put bitor(a.y, 0)
-- 2

(You can also address the components of a vector as if it were a list, like 
a[2] for y.)


<Prev in Thread] Current Thread [Next in Thread>