1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

A question for a flash game

  1. Feb 26, 2009 #1
    Hi
    i have any idea in physics 'i'm a game programmer who needs help
    i have this flash file
    http://www.knowingames.com/test_ik_06.swf"
    the original idea is that i can click any opint on any shape and it'd move
    as in the flash exmple

    i have no idea what is the name of this physics action
    does any one know ?
    or more importent - where i can find a formula that can teach me how to do this?
     
    Last edited by a moderator: Apr 24, 2017
  2. jcsd
  3. Feb 27, 2009 #2
    Part of the answer is in your example. The small gray dots outside of the shapes represent the center of mass of the shapes. As you drag the object, the line between the point clicked on and the point representing the center of mass tends to line up in the direction you are dragging.

    To program it, make the object rotate about the (moving) drag point in the closest direction to make the points line up in the direction you are dragging it. The rotational velocity depends on the drag velocity: the faster you drag it, the faster it rotates.

    It's a bit easier to understand if you just forget about the shape and picture a straight line between the drag point and the center of mass that's rotating through the smallest angle possible to match the direction in which you are dragging.
     
  4. Mar 10, 2009 #3
    Thanks - but the idea is that i want to able to clikc and drag and point of the shape
    do you have a resource for a formula that solve the problem i have
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: A question for a flash game
  1. New To The Game (Replies: 3)

  2. Camera Flash Pop Sound (Replies: 3)

Loading...