Professional Web Applications Themes

Camera control become inverse :( - Macromedia Director 3D

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 ...

  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. #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

Similar Threads

  1. 3D character camera control
    By JustStupid in forum Macromedia Director 3D
    Replies: 2
    Last Post: August 7th, 10:21 AM
  2. Inverse of model(s)UnderLoc?
    By veganMalcontent in forum Macromedia Director 3D
    Replies: 2
    Last Post: January 21st, 12:06 AM
  3. Camera control
    By ashaath in forum Macromedia Director 3D
    Replies: 4
    Last Post: January 18th, 11:21 PM
  4. Is there an inverse of ParagraphFormat
    By Joe_Krako in forum Macromedia ColdFusion
    Replies: 1
    Last Post: May 7th, 01:02 PM
  5. Control of web camera
    By Bobby H in forum Macromedia Director Basics
    Replies: 3
    Last Post: November 21st, 12:14 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