Professional Web Applications Themes

controlling camera with mouse - Macromedia Director 3D

*Note that this post is a copy of my post in a previews topic. i think it deserv a topic of its own :) (if it is not acceptable, i'll delete it) Did you think of movement system that uses the mouse as an input? I constantly try to build one, and it seems to have lots of bugs... first, i detect where the mouse moved, by storing the last position of the mouse and comparing its x,y to the next mouse position. If it moved up, i rotate the camera over the Y axis 1 step, and so on. ...

  1. #1

    Default controlling camera with mouse

    *Note that this post is a copy of my post in a previews topic. i think it
    deserv a topic of its own :)
    (if it is not acceptable, i'll delete it)

    Did you think of movement system that uses the mouse as an input?
    I constantly try to build one, and it seems to have lots of bugs...

    first, i detect where the mouse moved, by storing the last position of the
    mouse and comparing its x,y to the next mouse position. If it moved up, i
    rotate the camera over the Y axis 1 step, and so on.

    Do you have any idea at all to make it work? because as far for now, my
    cameara works fine in kind of half a sphere, when i turn around, the Z axis
    flips over ....
    any suggestions ?

    bgsBS Guest

  2. #2

    Default Re: controlling camera with mouse

    first use for the rotation two objecs. one for up and down rotation the other
    one for left and right rotation. if you want to use a egoshooter like rotation
    than use some xtra like "SetMouseLoc".

    if i understand you right you want to use a "on mousedown" where you press the
    mouse and move it over the screen and rotate the camera with it.

    i would create two group objects like group_1 and group_2 and make the one
    parent of the other one. use these to groups for rotation. maybe you use
    group_1 for left-right and group_2 for up-down. than make your camera parent of
    group_2 that you have this.

    group_1
    group_2
    camera

    that should work, in this way you will get no problems with a flipping axis
    and its much more easy to navigate with it.


    hondo3000 Guest

  3. #3

    Default Re: controlling camera with mouse

    nice thinking!
    thank you.

    i'll try that
    bgsBS Guest

Similar Threads

  1. Question kind of controlling camera
    By Indra Pribadi in forum Macromedia Director 3D
    Replies: 0
    Last Post: March 10th, 06:31 PM
  2. Camera to follow mouse movements
    By Spastuscat in forum Macromedia Director 3D
    Replies: 2
    Last Post: February 10th, 10:41 PM
  3. 3D navigation/camera controlling
    By Ola Endre Reitstøen in forum Macromedia Director 3D
    Replies: 1
    Last Post: May 23rd, 11:03 AM
  4. Controlling Scripts with the mouse
    By Random Rob webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 1
    Last Post: December 6th, 07:13 PM
  5. Controlling Movie via mouse
    By Will Mendez in forum Macromedia Flash
    Replies: 2
    Last Post: October 18th, 11:03 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