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

  1. #1

    Default Rotation issues

    Here I am again... Sorry if I am bothering you!

    I'm trying to make a model go from a to b, where a is where you do a mousedown
    and b is where you do a mouseup. And it works with interpolation (thank you
    James Newton!) and looks quite good. The next step for me is to make the model
    rotate with interpolating so that a special face of the mesh points towards b.
    The "model.pointAt(loc1)" works but I can't control it so the results are not
    satisfying. An example of what I want to do can be found in Warcraft Reloaded
    by the genius Necromanthus.
    Any suggestions?

    Mazuho Guest

  2. Similar Questions and Discussions

    1. Rotation between two transform.rotation vectors.
      Hello, I think my subject is pretty straight forward. :) I am looking for a way for my 3D character to slowly rotate between two vectors. The...
    2. Rotation Ads
      Hi - Thanks in advance for any help. I'm have a section on the page for sponsers. I want to have a sponsor show for a 5 seconds and then change...
    3. No rotation?
      I have a W3D file that I import into Director. There, I can pan, zoom, rotate just fine, but when I preview it in a browser (F12) or publish it, I...
    4. rotation
      > I'm trying to create a animation (flash 5) with an object rotation. http://www.macromedia.com/support/flash/ts/documents/center_point.htm ...
    5. Rotation?
      im creating a small bullet seen for a movie of mine , and was wondering how i can do angles and rotations on a bullet easily? ie. A bullet flys...
  3. #2

    Default Re: Rotation issues

    Let's break this down into steps.

    To use interpolate() you need two transforms: the transform of the model
    before it moves and a transform representing its position at the end of its
    move. Suppose myObject is a pointer to the object you want to rotate. Suppose
    myTarget is a pointer to the object that you want myObject to point at. You
    can obtain these two transforms as follows:

    myStartTransform = myObject.transform.duplicate()
    myObject.pointAt(myTarget)
    myEndTransform = myObject.transform.duplicate()

    Now you simply need to perform the interpolation between these two transforms,
    and set the transform of myObject to the result. So long as there is no update
    between the lines above and the first interpolation, the user will never see
    that myObject rotated momentarily to its end position.

    openspark Guest

  4. #3

    Default Re: Rotation issues

    Thanks again!
    Is there something special to think of when interpolating an object two times?
    As it is now I have put the rotation interpolation and the movement
    interpolation in the same handler, and it seems as they don't work together
    just like that. Should I put them in separate handlers or something? Now they
    are both called on exitframe. Thanks for all your help.

    Mazuho Guest

  5. #4

    Default Re: Rotation issues

    When you use interpolate(), Director chooses shortest path. This may not be
    the most natural. If you need more precise control of the movement, then I
    think that you will need to come to terms with the 3D mathematics involved, and
    build the animation yourself.

    It sounds that you are trying to get the object to travel along the direction
    in which it is facing, so that it arrives at its end point after describing a
    curve. It would be much easier to make the object rotate on the spot, then
    travel in a straight line (think RoboCop). The more complex alternative is to
    precalculate the curve, say using a bezier, then work out on each frame how far
    the object will have travelled along the curve, and so what its new rotation
    and position will be.

    Here are a couple of examples of pre-calculated Lingo-controlled
    animations:[url]http://nonlinear.openspark.com/tips/3D/matchbox/[/url] and
    [url]http://nonlinear.openspark.com/tips/3D/origami/[/url]

    openspark 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