View Single Post
  #2  
Old 09-02-2003, 01:32 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

The viz.rotate command rotates the BODY_ORI by the given amount, relative to its current rotation. If you want to rotate the BODY_ORI with an absolute rotation there are two ways of doing it.

Method 1
Reset the body ori to zero and perform the rotation
Code:
viz.reset(viz.BODY_ORI)
viz.rotate(0,15,0)
Method 2
Get access to the main viewpoint object and call its rotate function which performs the rotation in absolute space.
Code:
view = viz.get(viz.MAIN_VIEWPOINT)
view.rotate(0,15,0,'',viz.BODY_ORI)
Hope this helps
Reply With Quote