1 Reply Latest reply on Mar 2, 2010 9:06 AM by Robert Crowe

    how to set a worldPosition

    downerxx

      im trying to remove a w3d file from my movie and have all my models spawned by the script, i run into a error when it comes to this function

       

      Man.worldPosition = start.worldPosition

       

      since that models location will no longer exsist,  is it possible to just set its XYZ to 0,0,0

       

       

      EDIT: nevermind found it, was

      .transform.position=vector(0,0,0)
        • 1. Re: how to set a worldPosition
          Robert Crowe

          Yeah, or you can save the position before you delete the model:

           

          savepos = start.worldPosition

          ...

          newmod.worldPosition = savepos

           

          I think that will work, or you might need to explicitly create a new vector instance:

           

          savepos = vector(start.worldPosition.x, start.worldPosition.y, start.worldPosition.z)