Ask a Question related to Macromedia Director 3D, Design and Development.
-
Mazuho #1
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
-
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... -
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... -
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... -
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 ... -
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... -
openspark #2
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
-
Mazuho #3
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
-
openspark #4
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



Reply With Quote

