Plugin Cafe's original forum is still archived and available for searches. The ability to post here has been disabled.
 
Developer's Forum [PREV] [NEXT]
Subject: RE: Setting position along objects axis....
From: Mikael Sterner
Date: 9/14/2001 7:57 PM GMT
    > Right at the beginning of the tutorial it states
    > that GetPosition() is the local coordinates.

    This simply means that you are changing the coordinates in the object's own matrix, without any transformations. I.e. the coordinates are in the parent's coordinate system.

    To get your kind of translation, use this function
    MoveObject(obj, trans)
    {
      obj->SetPosition(obj->GetPosition() + 
                       obj->GetMln()->GetMulV(trans));
    }
    

    where for example trans=vector(100,0,0) moves obj 100 units along its X-axis. (The trans vector is transformed from within the local system of the object to the parent's system.)

    Mikael Sterner
    Developer Support
Current Message String
new Setting position along objects axis.... - Mark Weaver - 9/13/2001 5:07 AM GMT
 new RE: Setting position along objects axis.... - Philip Losch - 9/13/2001 2:46 PM GMT
 new RE: Setting position along objects axis.... - Mark Weaver - 9/13/2001 3:54 PM GMT
 new RE: Setting position along objects axis.... - John Phillips - 9/14/2001 2:12 AM GMT
 new RE: Setting position along objects axis.... - Mark Weaver - 9/14/2001 4:14 AM GMT
 new RE: Setting position along objects axis.... - Mikael Sterner - 9/14/2001 7:57 PM GMT
 new RE: Setting position along objects axis.... - Mark Weaver - 9/17/2001 6:25 AM GMT
[PREV] [NEXT]