View Single Post
  #3  
Old 03-21-2007, 02:30 AM
ghazanfar ghazanfar is offline
Member
 
Join Date: Mar 2007
Posts: 11
Thanks a lot for your help. We did not know there existed an angleToPoint() method. This helped us solve this. The main problem was that we thought that the rotate() method used the current rotation, and rotated further on from that point. But it seems the method just places the avatar in the rotation, not regarding the rotation before the method is applied.

Now the function is working using the following code:

pos=male.get(viz.POSITION)
pos2=female.get(viz.POSITION)
rotate_degrees = vizmat.AngleToPoint(pos[0],pos[2],pos2[0],pos2[2])
male.rotate(0,1,0,rotate_degrees)
male.act(6)
Reply With Quote