Professional Web Applications Themes

Pause 3D camera movement - Macromedia Director 3D

I have a 3D scene that uses interactive and default movement of the camera (press a button to move the camera, release the button and the camera moves back to it's origin). I want to create a button to act as a pause button so any camera movement stops but then resumes when the button is pressed again. Hopefully there's some easy lingo, but I seem to be missing it....

Sponsored Links
  1. #1

    Default Pause 3D camera movement

    I have a 3D scene that uses interactive and default movement of the camera
    (press a button to move the camera, release the button and the camera moves
    back to it's origin).

    I want to create a button to act as a pause button so any camera movement
    stops but then resumes when the button is pressed again.

    Hopefully there's some easy lingo, but I seem to be missing it.

    Sponsored Links
    Nickname Guest

  2. #2

    Default Re: Pause 3D camera movement

    Hello there :)

    You could have a button that toggles a global eg. gPaused between true and
    false with each click and add an if statement to your camera lingo like this
    pseudo code...

    ---------------Possible Button behavior-----
    global gPaused

    on beginSprite
    gPaused = -1
    end beginSprite

    on mouseUp me
    --toggle the pause on / off
    gPaused = -gPaused
    end mouseUp



    ------------------------------3D sprite behaviour snippet
    on exitFrame
    if NOT gPaused then

    --Put all your camera lingo inside this if statement
    if NOT gPanLeft AND NOT gPanRight AND NOT gPanUp AND NOT gPanDown AND NOT
    gZoomIn AND NOT gZoomOut then
    pCamRotX = pCamRotX * 0.95
    pCamRotY = pCamRotY * 0.95
    pCamRotZ = pCamRotZ * 0.95
    pCamera.transform.rotation = vector(pCamRotX,pCamRotY,pCamRotZ)
    end if

    end if
    end exitFrame
    -------------------------------

    Cheers

    Richard Smith


    Richard Guest

  3. #3

    Default Re: Pause 3D camera movement

    Now nothing moves!!! :(

    I've triple checked the spellings. I can get the movement, but not the pause,
    if I delete the NOT from the first line in the camera lingo. Varying the text
    in the button behaviour does not effect anything.

    Any clues?

    Nickname Guest

  4. #4

    Default Re: Pause 3D camera movement

     

    Hi there, sorry, my fault, I assumed -1 was classed as false in Director,
    try this....


    ------------------------------3D sprite behaviour snippet
    on exitFrame
    if gPaused = -1 then

    --Put all your camera lingo inside this if statement
    if NOT gPanLeft AND NOT gPanRight AND NOT gPanUp AND NOT gPanDown AND NOT
    gZoomIn AND NOT gZoomOut then
    pCamRotX = pCamRotX * 0.95
    pCamRotY = pCamRotY * 0.95
    pCamRotZ = pCamRotZ * 0.95
    pCamera.transform.rotation = vector(pCamRotX,pCamRotY,pCamRotZ)
    end if

    end if
    end exitFrame
    -------------------------------

    Remember to add all your camera rotate and return to center code inside the
    if gPaused = -1 statement.

    Hope this works! Cheers :)

    Richard




    Richard Guest

  5. #5

    Default Re: Pause 3D camera movement

    Thanks for your help Richard, much appreciated.
    Nickname 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. Restrict Camera movement and collision
    By Nickname in forum Macromedia Director 3D
    Replies: 5
    Last Post: December 19th, 11:58 AM
  3. Smooth camera movement
    By bgsBS in forum Macromedia Director 3D
    Replies: 1
    Last Post: July 22nd, 08:34 PM
  4. third person camera movement
    By Richard.B in forum Macromedia Director 3D
    Replies: 1
    Last Post: May 10th, 12:34 PM
  5. using mouse movement to dolly camera in/out
    By andrew in forum Macromedia Director 3D
    Replies: 0
    Last Post: August 13th, 04:06 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