Getting x value from a vector
I have a vector from
location = self get-location.
and I want to get the x value of the location. Any way to do this?
I tried
location = self get-location. onlyX = (location * [ (1.0, 0, 0), (0, 0, 0), (0, 0, 0) ]). xVal = |onlyX|.
but the vector onlyX ends up with nan/junk like -1.#QNAN, so xVal also comes up with a similar value.
Any ideas?
Thanks,
Jonathan
»
Submitted by jmugan on Mon, 2006-05-15 11:04.
- Login to post comments

Getting x value from a vector
Not sure why you're getting the NaNs there, but the simple way to get a vector component is using this notation:
I notice that this isn't in the documentation -- I'll make sure it gets added!
- jon
Getting x value from a vector
Jon,
That did the trick.
Thank you,
Jonathan