Camera control become inverse :(

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

  1. #1

    Default Camera control become inverse :(

    Hi there!

    I would like to use camera motion to interact with my 3D model instead of
    using drag Model fonction.

    My script work just fine but it steal a problem when the model is rotating
    180 degrees the manipulation become inverse :(

    That is possible to fix this?

    there is my full script for camera control:

    property ax,ay,az
    property mh,mv

    on exitframe
    -- record the world position of model "smallbox"(small box) into variable
    "polePos"
    polePos = vector (0, -2, 0 )
    --
    if the mousedown=true then
    if mh<> the mouseh then
    -- rotate camera number 1 (default camera) following y axis
    (vector(0,1,0)
    -- the centre point is on small box/"smallbox" (polePos)
    -- rotate this much (mh-the mouseh)
    member("3D").camera[1].rotate(polePos, vector(0,1,0), (mh-the mouseh),
    #world)
    --
    mh = the mouseh
    end if
    if mv<> the mousev then
    -- rotate camera number 1 (default camera) following y axis
    (vector(0,1,0)
    -- the centre point is on small box/"smallbox" (polePos)
    -- rotate this much (mh-the mouseh)
    member("3D").camera[1].rotate(polePos, vector(1,0,0), (mv-the mousev),
    #world)
    --
    mv = the mousev
    end if

    else
    mh=the mouseh
    mv=the mousev


    end if

    end


    frank Guest

  2. Similar Questions and Discussions

    1. 3D character camera control
      Hi, Just had a quick look and don't think this question has been answered before. I'm trying to get my camera to follow a character so the camera...
    2. Camera control
      :camera; How can I get the camera to move to the left or right (or vertically up & down for that matter) while pointing straight ahead,all the...
    3. Is there an inverse of ParagraphFormat
      Hi, I'm trying to build a forum and want to allow users to edit their message boxes (textarea boxes). I use the ParagraphFormat whenever I...
    4. Control of web camera
      Hello, I'm trying to find out if it is possible to open up the sofware for a web cam take a picture and use it in my director movie. Basically...
    5. Trouble with Matrix::inverse
      I decided to use Ruby to write a simple program to help my daughter with her math homework, which involves solving systems of linear equations...
  3. #2

    Default Re: Camera control become inverse :(

    With your code as it is, you could add a test updating a boolean, e.g
    pIsGoingNorthward, to know whether you are going northward (e.g between -90
    and 90° on the X axis) or not.

    E.g, when you go northward, you update the position with a positive offset,
    otherwise, you update the position with a negative offset.



    Karl Sigiscar 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