WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-20-2007, 01:32 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The problem might be caused by adding angpos[3] to the rotation. When you retrieve the axis angle it is not guaranteed that the rotation will be around the positive y axis. Try printing out the entire angpos for debugging. A better method might be to retrieve the euler rotation and use the yaw instead.

Also, you can use the vizmat.AngleToPoint function to compute the angle difference. Here is some sample code:
Code:
pos=male1.get(viz.POSITION)
euler=male1.get(viz.EULER)
pos2=male.get(viz.POSITION)
rotate_degrees = vizmat.AngleToPoint(pos[0],pos[2],pos2[0],pos2[2])
rotate_degrees -= euler[0]
Reply With Quote
 

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:35 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC