Professional Web Applications Themes

get and set modell positions and rotations - Macromedia Director 3D

Hi! I have two diffrent moddels in one scene. I choose to hide one of the modells at the start. So the user can interact wiht one of the modells, rotatet it to be precis. Now i would like to hide the first modell, thats no problem, but when to second modell is unhided i would like it to have the same transformation as the first modell. Any ideas?Im all out....

  1. #1

    Default get and set modell positions and rotations

    Hi!
    I have two diffrent moddels in one scene. I choose to hide one of the modells
    at the start. So the user can interact wiht one of the modells, rotatet it to
    be precis. Now i would like to hide the first modell, thats no problem, but
    when to second modell is unhided i would like it to have the same
    transformation as the first modell.

    Any ideas?Im all out.

    biiin Guest

  2. #2

    Default Re: get and set modell positions and rotations

    at the point you wish to make the second model visible set it to the first
    model's transfrom like so:

    model2.transform = model1.getWorldTransform()
    model2.visibility = #front

    "biiin" <com> wrote in message
    news:esong7$4l1$macromedia.com... 


    mocoda Guest

  3. #3

    Default Re: get and set modell positions and rotations

    Simple as that! You realy saved my neck!

    Much love!
    biiin Guest

  4. #4

    Default Re: get and set modell positions and rotations

    ok...allmost there...maybe a little bit quick to mark the answer.
    http://www.qbik3d.com/demos/ba/
    Pls take a look at that, 0,9mb.

    Doesnt quit work all the time, and the drag to rotate doesnt allways work on
    first click. What am i doing wrong?

    biiin Guest

  5. #5

    Default Re: get and set modell positions and rotations

    no idea without seeing your code - please post your main behaviour script
    and i'll take a quick look

    "biiin" <com> wrote in message
    news:esot55$aqi$macromedia.com... 


    mocoda Guest

  6. #6

    Default Re: get and set modell positions and rotations

    That is very nice of you!!
    You can find the file here : www.qbik3d.com/demos/ba/director.dir

    To understand the code:
    svart = black
    vit = white
    the rest is not a matter of language skills in swedish ;-)

    biiin Guest

  7. #7

    Default Re: get and set modell positions and rotations

    Glad to help - it got me away from building an IKEA chest of drawers for a
    while ;)

    There were a few little problems - rather than explain how to fix each step
    i just did it and uploaded a new file for you to
    http://www.kinelco.com/temp/director2.dir - it should hopefully all make
    sense with the notes below:

    1. The sofas didn't set the right transforms because you were setting them
    the wrong way round - ie setting the white sofa to the transform of the
    black before you turn the black one on - should be the other way round

    2. The reset button was crashing the Director because you were performing a
    resetWorld() - a resetWorld() is only really required when a sprite
    initialises so you generally put it in the first beginSprite behaviour. The
    reset button now calls a script in the Movie Script called resetSofas which
    resets both sofas back to the origin and resets the Flash sprite so your
    buttons are in the correct state

    3. The sofa wasn't responding to clicks everytime because the invisible sofa
    was being clicked on instead of the visible one. To overcome this i move the
    sofas off screen as well as make them invisible

    4. You had multiple Movie Scripts - not necessary - I put all your global
    functions in one Movie Script - makes it much easier to deal with.



    mocoda Guest

  8. #8

    Default Re: get and set modell positions and rotations

    WOOO! I cant be leave thise!
    Your to kind!

    Dont know how to thank you!
    And good luck with the IKEA drawer!

    Thank you so very very very very much!
    biiin Guest

Similar Threads

  1. MX Window Positions Won't Save
    By shepherdboy in forum Macromedia Director Basics
    Replies: 0
    Last Post: May 11th, 02:28 PM
  2. Counting number of rotations
    By Howdy in forum Macromedia Director Lingo
    Replies: 0
    Last Post: December 10th, 02:23 PM
  3. Help: Controling Multiple Object Rotations
    By Theocrocide webforumsuser@macromedia.com in forum Macromedia Director 3D
    Replies: 1
    Last Post: November 13th, 05:47 PM
  4. line positions in text box
    By EdMX webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 1
    Last Post: August 23rd, 11:38 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