Well, I know you could do something like this very easily using a physics
engine like Box2D (http://box2dflash.sourceforge.net/), but the "very
easily" part only kicks in after you spend several hours converting your
entire application to using a third party physics engine.

If you're just trying to do some more basic faux-gravity rotation, there's
probably simpler ways of doing it. If I were gonna fake it and I had a
simple shape like a rectangle to work with, I might esimate what portion of
the sprite was to the left and the right of my cursor, use that to apply a
little force to some internal _angularVelocity variable, and then combine
that with the MatrixTransfrmer.rotateAroundInternalPoint method to rotate my
object around the mouse cursor. But I can't promise you that'll necessarily
look any good, though. That's just a guess.

--T


On Mon, Dec 1, 2008 at 10:12 AM, allandt bik-elliott (thefieldcomic.com) <
[EMAIL PROTECTED]> wrote:

> So I guess what i'm trying to get at is that I'd like to apply gravity and
> momentum to an objects angle rather than directly to their y axis
>
> anyone have any ideas?
>
> thanks
> a
>
> --------------------------------------
>
>
> hi guys
>
> could anyone point me in the right direction to do the following, please?
>
> I'd like an object that is dragged to correctly respond to being pulled
> around by pivoting around the point it is dragged by (also applying
> downward
> force to represent gravity)
>
> for example, if i hold a pencil lightly at one end, it will pivot around
> the
> point i am holding and swing until it comes to a rest pointing straight
> down.
>
> does anyone know of any tutorials that go into this kind of thing?
>
> thanks for your help
> a
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to