Itoo Software Forum

Forest Pack => Forest Pro (*) => Topic started by: designstor on October 29, 2012, 04:37:31 PM

Title: getRotation not working
Post by: designstor on October 29, 2012, 04:37:31 PM
I am trying to output a list of Forest objects' positions. I am using the following code and having issues with getRotation.

Code: [Select]
clearListener()
(
f = $Forest001
f_count =f.count()

showinterfaces f
format "Forest Count = %\n" f_count

for a = 0 to (f_count-1) do (
format "index = %\n" a
format "position = %\n" (f.getPosition a)
format "rotation = %\n" (f.getRotation a)
format "scale = %\n" (f.getSize a)
format "\n\n"

)

)

I am using version 3.9.5.

Any help would be appreciated!
Title: Re: getRotation not working
Post by: iToo on October 30, 2012, 10:13:33 AM

"getRotation" returns the manual rotation in Custom Edit mode, but not the random rotation.

To get the full transform, you would use "getFullTransform". It returns a transformation Matrix (which includes scale, rotation and translation), in local coordinates of the Forest object.

Title: Re: getRotation not working
Post by: designstor on October 30, 2012, 04:55:06 PM
Thanks!