Professional Web Applications Themes

Orbit Camera - Macromedia Director 3D

I'm hoping someone can help me with a script that will orbit a camera (only on x-axis) around an object. The premade script in the library works great, but need to change the wording to allow for the left and right arrows instead of left or right mouse buttons. Is there a way to change the library script provided with the program or can anyone help me with creating a script to do this function....

  1. #1

    Default Orbit Camera

    I'm hoping someone can help me with a script that will orbit a camera (only on
    x-axis) around an object. The premade script in the library works great, but
    need to change the wording to allow for the left and right arrows instead of
    left or right mouse buttons. Is there a way to change the library script
    provided with the program or can anyone help me with creating a script to do
    this function.

    JAH_P Guest

  2. #2

    Default Re: Orbit Camera

    Give this a go-

    on exitframe
    if keypressed(126) then ---up
    sprite(X).camera.translate(0,0,-50,#self)----ZOOM IN
    end if

    if keypressed(125) then -- down
    sprite(X).camera.translate(0,0,50,#self)-----ZOOM OUT
    end if

    if keypressed(124) then --right
    sprite(X).camera.rotate(0,5,0,#world) ----ROTATE RIGHT
    end if

    if keypressed(123) then --left
    sprite(X).camera.rotate(0,-5,0,#world) ----ROTATE LEFT
    end if
    end if
    end if
    end

    otterman Guest

  3. #3

    Default Re: Orbit Camera

    [q]Originally posted by: JAH_P
    I'm hoping someone can help me with a script that will orbit a camera (only on
    x-axis) around an object. [/q]

    http://necromanthus.com/Games/ShockWave/tutorials/PanCamera.html
    note: start it in "Targeted" mode.



    necromanthus Guest

  4. #4

    Default Re: Orbit Camera

    otterman - I copied your script into my model. and am having an issue with what
    "x" should be. your line says -- sprite(x).camera <- what do i need to put in
    place of the "x". I did get it to work as sprite(1).camera when starting from a
    new movie with only the one model and no other sprites, so then i tried using
    sprite(242).camera --242 being the sprite number in the original project -- but
    it still comes up with "script error: property not found" at the bottom it says
    #camera.. what am i doing wrong???

    JAH_P Guest

  5. #5

    Default Re: Orbit Camera

    necromanthus - i started studing yours - i dont understand where the script is
    for your targeted and non targeted modes. as im following the script along i
    cant find what your global "w", "demo", "dmy", and "way" are? sorry probably
    too much to explain - otterman's script is probably better for my experience
    level, but im very interested to see how this works.

    JAH_P Guest

  6. #6

    Default Re: Orbit Camera

    [q]Originally posted by: JAH_P
    necromanthus - i started studing yours - i dont understand where the script is
    for your targeted and non targeted modes. as im following the script along i
    cant find what your global "w", "demo", "dmy", and "way" are? sorry probably
    too much to explain - otterman's script is probably better for my experience
    level, but im very interested to see how this works.[/q]

    I see ...
    Here is what's important to you:

    if keypressed(123) then
    -- Cursor Left is down

    member("room").camera(1).rotate(vector(0,0,-1),member("room").model("target"))
    end if
    if keypressed(124) then
    -- Cursor Right is down

    member("room").camera(1).rotate(vector(0,0,1),memb er("room").model("target"))
    end if


    Simple enough, isn't it ?
    cheers



    necromanthus Guest

  7. #7

    Default Re: Orbit Camera

    Sorry Jah! Only just remembered I posted to this query. The he x simply refers
    to the sprite number of your 3d member.

    Also necromanthus has sum crackn examples of what can be done with director
    and shockwave- u learning from the best!

    otterman Guest

Similar Threads

  1. camera.get for an outdoor camera ( not a webcam )
    By dsdsdsdsd in forum Macromedia Flash Flashcom
    Replies: 1
    Last Post: September 5th, 03:44 PM
  2. Which Is the Better Camera F6, OR D2X?
    By TIM in forum Photography
    Replies: 4
    Last Post: November 27th, 02:16 AM
  3. Camera
    By DSH-Hotmail.com in forum Photography
    Replies: 10
    Last Post: September 3rd, 05:54 AM
  4. What meg camera should I buy?
    By uncle Tom in forum Adobe Photoshop Elements
    Replies: 9
    Last Post: August 23rd, 11:21 AM
  5. O.T. Hot Camera
    By Steven Reno in forum Adobe Photoshop Elements
    Replies: 14
    Last Post: July 31st, 11:21 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