Itoo Software Forum

Author Topic: getRotation not working  (Read 1308 times)

designstor

  • Newbie
  • *
  • Posts: 3
getRotation not working
« 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!

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3148
    • iToo Software
Re: getRotation not working
« Reply #1 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.

Carlos Quintero
iToo Software

designstor

  • Newbie
  • *
  • Posts: 3
Re: getRotation not working
« Reply #2 on: October 30, 2012, 04:55:06 PM »
Thanks!