Professional Web Applications Themes

position - Macromedia Director 3D

hi,all there is a box ,the initia position is vector(-79,45,0) when i use the method rotate member("X").model("box").rotate(vector(0,-7,0),vector(0,0,1),6) after the box rotate one angle,i get the WorldPosition BoxPos = member("X").model("box").WorldPosition but the position does not changed BoxPos is vector(-79,45,0) why? how can i get the new position?...

  1. #1

    Default position

    hi,all
    there is a box ,the initia position is vector(-79,45,0)
    when i use the method rotate
    member("X").model("box").rotate(vector(0,-7,0),vector(0,0,1),6)
    after the box rotate one angle,i get the WorldPosition
    BoxPos = member("X").model("box").WorldPosition
    but the position does not changed
    BoxPos is vector(-79,45,0)
    why?
    how can i get the new position?





    new3Duser Guest

  2. #2

    Default Re: position

    I cannot reproduce your results. Here are my steps.

    Create a new movie, then create a Movie Script member with the following
    scriptText:

    on startMovie(me)
    vMember = new(#Shockwave3D) -- will be erased
    vResource = vMember.newModelResource("Box", #box)
    vModel = vMember.newModel("Box", vResource)

    vModel.worldPosition = vector(-79, 45, 0)
    vModel.rotate(vector(0,-7,0), vector(0, 0, 1), 6)
    put vModel.worldPosition

    -- vector( -79.7317, 44.9617, 0.0000 )
    --vMember.erase()
    end

    Now run your movie. You should see the output ...

    -- vector( -79.7317, 44.9617, 0.0000 )

    ... in the Message window. This shows that the worldPosition of the Box model
    has moved as a result of its rotation.

    Have you set the floatPrecision to 0? This would account for there being no
    figures after the decimal point in the value you cite for BoxPos. Even so, you
    should see a value different from the start value:

    -- vector( -80, 45, 0 )

    I suspect that your code is returning the initial value for BoxPos, not the
    value of member("X").model("box").WorldPosition.

    openspark Guest

  3. #3

    Default Re: position

    thanks,openspark
    new3Duser Guest

Similar Threads

  1. Replies: 1
    Last Post: October 22nd, 08:44 PM
  2. get position
    By kruak in forum Macromedia Flash Flashcom
    Replies: 0
    Last Post: December 9th, 10:45 PM
  3. Available Position: ASP.net/VB.net
    By Erich Kolb in forum ASP.NET Data Grid Control
    Replies: 8
    Last Post: March 13th, 11:11 PM
  4. z position changes with y position
    By Fábio Pinatti in forum Macromedia Director 3D
    Replies: 2
    Last Post: November 21st, 05:05 PM
  5. how to position pop-up relatively?
    By mark haynes in forum Macromedia Fireworks
    Replies: 0
    Last Post: July 8th, 02:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139