Professional Web Applications Themes

Camera rotation conversion to SWF MC Arrow - Macromedia Director 3D

We currently are working on a 3D Vis project. We have a DCR 3D world in a DIV within our web page. In another DIV we have our "Gods Eye" view. This was done in Flash and has a moving target box that shows your relative lateral positoin in the 3D world. We have this working. The problem is our directional arrow within this "Target Box". As we rotate in the 3D world, we are attempting to send the SWF a value in order to rotate the arrow in the relative position. The problem is that the 3D world has ...

  1. #1

    Default Camera rotation conversion to SWF MC Arrow

    We currently are working on a 3D Vis project. We have a DCR 3D world in a DIV
    within our web page. In another DIV we have our "Gods Eye" view. This was done
    in Flash and has a moving target box that shows your relative lateral positoin
    in the 3D world. We have this working. The problem is our directional arrow
    within this "Target Box". As we rotate in the 3D world, we are attempting to
    send the SWF a value in order to rotate the arrow in the relative position. The
    problem is that the 3D world has different rotation values then the flash. In
    other words, if we are at 90 degrees in the 3D world the value of the SWF is 0.
    The 3D world works in values of -0 to -180 and 0 - 180 where as the SWF works
    on a 0-360 value. Can anyone help with the conversion of this so that we can
    send the SWF the correct value? Thank you in advance.

    delex_media Guest

  2. #2

    Default Re: Camera rotation conversion to SWF MC Arrow

    this is a problem when you simply want to get the angle in degrees form 0 to
    360. but i think you should take a look at:

    anglebetween
    and xaxis, zaxis, yaxis

    and here is some code that should work, did not tested it right now but take a
    look at the idea:

    grouprot=pMember.group("camgroup").transform.xaxis

    if grouprot.z>0 then
    theangle= grouprot.anglebetween(vector(1,0,0))
    end if

    if grouprot.z<0 then
    theangle=( 360 - grouprot.anglebetween(vector(1,0,0)))
    end if

    hope it will work, the idea is to use a group that only does the y-rotation of
    your objekt. so it will have all the time the y-axis as vector (0,1,0), than
    you can use the zaxis to specifie on wich "side" you are at the moment.


    hondo3000 Guest

Similar Threads

  1. reset camera rotation?
    By tacbob in forum Macromedia Director 3D
    Replies: 1
    Last Post: March 9th, 02:44 PM
  2. Camera rotation around an object
    By aperion0 in forum Macromedia Director 3D
    Replies: 0
    Last Post: July 14th, 04:51 AM
  3. Camera rotation
    By de4med in forum Macromedia Director 3D
    Replies: 6
    Last Post: May 6th, 02:52 PM
  4. Please help with camera rotation
    By de4med in forum Macromedia Director 3D
    Replies: 5
    Last Post: October 31st, 08:57 AM
  5. rotation conversion question
    By H.C.H. in forum Macromedia Director 3D
    Replies: 0
    Last Post: August 15th, 12:49 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