Ask a Question related to Macromedia Director 3D, Design and Development.

  1. #1

    Default Navigate a 3d world

    Hi all, I'm not sure how to explain this. I have a wrl of a room and I could
    control the camera using the available Dolly and pan behaviors. I am planning
    to add a plan view next to it like a keyplan which shows my location(shown say
    a filled circle) . Now how do I move my camera and see the location of the
    circle (at plan) move in sync. Can I just attach the circle(? behavior) to the
    camera so both of them moves at the same time? Or do I need a separate behavior
    for the circle? Thanks. Any help will be appreciated.

    ArielC Guest

  2. Similar Questions and Discussions

    1. How to navigate...
      Hi My problem is probably simple. But I do not know, how to obtain directory from a client, to store a downloaded file. I mean, client can to...
    2. Navigate multiple PDF files
      I have a large book split into multiple PDF files. Basically one file per chapter. Currently the navigation from one chapter to the next works by...
    3. Using variables to navigate
      I wanted to title this "Am I taking CRAZY PILLS??", but opted for the current title Ok...it seems so simple, but obviously I must be missing...
    4. Using ENTER key to navigate thru' RadioButtonList
      i am able to trap the EnterKey . radiopayment.Attributes.Add("onkeypress", "return handleEnter(this, event)") and then in the javascript...
    5. Navigate - specifying URLs to link to
      I have created a signpost that I want to use to navigate to various web pages pointed to by the direction indicators on the signpost graphic, I...
  3. #2

    Default Re: Navigate a 3d world

    ArielC wrote:
    > Hi all, I'm not sure how to explain this. I have a wrl of a room and I could
    > control the camera using the available Dolly and pan behaviors. I am planning
    > to add a plan view next to it like a keyplan which shows my location(shown say
    > a filled circle) . Now how do I move my camera and see the location of the
    > circle (at plan) move in sync. Can I just attach the circle(? behavior) to the
    > camera so both of them moves at the same time? Or do I need a separate behavior
    > for the circle? Thanks. Any help will be appreciated.
    >
    Hi. I´ve done that top view with a sepparate sprite for the plan and
    another for the circle [url]www.onwine.com.ar[/url] > demos > house. Then, it´s all
    about 2D maths. You get the 3D coordinates of each side so you know the
    boundaries and then convert that to 2D space. Here´s my -not so clean-
    behavior:

    property pMember -- reference to the 3D member used by this sprite
    property pSprite -- reference to this sprite
    property pCamera -- reference to the sprite's camera
    property pTop, pRight
    property pWidth3D, pHeight3D
    -------------------------------------------------------------------
    property p2dMap
    property pWidth2D, pHeight2D
    property pRedPoint
    property pRightBorder, pTopBorder

    ---------------------------
    property pTime2wait, pBeginCounting

    on beginSprite me
    -------------------3D refs
    pSprite = sprite(1)
    pMember = pSprite.member
    pCamera = pSprite.camera

    pTop = -1575
    pHeight3D = (pTop * -1) + 640

    pRight = -790
    pWidth3D = (pRight * -1) + 690

    ----------------------- 2d map refs
    p2dMap = sprite(me.spriteNum)
    pWidth2D = p2dMap.width
    pHeight2D = p2dMap.height
    pRightBorder =p2dMap.rect[3]
    pTopBorder = p2dMap.rect[2]
    pRedPoint = sprite(5)

    ------------------------timer refs
    pBeginCounting = the milliseconds
    pTime2wait = 333 --update map every 1/3 sec


    end


    on update2dMap me

    camPos = pCamera.worldposition

    --move Y axis
    camY = camPos.x
    Ypercent = (camY + (pTop * -1)) / pHeight3D
    pRedPoint.locV = pTopBorder + (pHeight2D * Ypercent)

    --move X axis
    camX = camPos.z
    Xpercent = (camX + (pRight * -1)) / pWidth3D
    pRedPoint.locH = pRightBorder - (pWidth2D * Xpercent)

    end


    on enterFrame me
    --timer
    timeElapsed = the milliseconds - pBeginCounting
    if timeElapsed > pTime2wait then
    update2dMap me
    pBeginCounting = the milliseconds
    end if
    end

    HTH,
    --
    Agustín María Rodríguez | Partner
    Methanoia Studio | [url]http://www.methanoia.com[/url]
    ---------------------------------------------------
    [url]www.onwine.com.ar[/url] > Macromedia Director demos & code
    Agustín María Rodríguez Guest

  4. #3

    Default Re: Navigate a 3d world

    Thanks. But I tried to attach it to my 3dmember but nothing seem to happen. What am I doing wrong?
    ArielC Guest

  5. #4

    Default Re: Navigate a 3d world

    ArielC wrote:
    > Thanks. But I tried to attach it to my 3dmember but nothing seem to happen. What am I doing wrong?
    Hi, Ariel. My behavior is not intended to work on every existing W3D
    scene on the planet ;) It´s just an idea of a possible approach. You
    have to make it fit for your project although I realized that you´re not
    willing to do any programming at all. I´m not aware of any ´ready to go´
    behavior for achieving this without programming :(

    hth,
    --
    Agustín María Rodríguez | Partner
    Methanoia Studio | [url]http://www.methanoia.com[/url]
    ---------------------------------------------------
    [url]www.onwine.com.ar[/url] > Macromedia Director demos & code
    Agustín María Rodríguez Guest

Posting Permissions

  • You may not post new threads
  • You may 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