To add comments or start new threads please go to the full version of: Help with Physics for a game
PhysOrgForum Science, Physics and Technology Discussion Forums > Physics > Physics General

najam
Hey Guys,
After searching the web like a crazy guy I could not get a solution that could help me figure out my problem. And then i got here... I hope to get some help from you physics dudes... Here is my problem...

I’m making a Flash(web based) game. In it the user will be pushing sticks around with his mouse. The user will grab a part of the stick by pressing the mouse button down and move it around. Now thing is I want to make the stick rotate as a user grabs the end of the stick that are away from its center of gravity and cause it to move. Thing is the user might move the stick in any direction, so how do I find out how much to rotate and when does the rotational movement stop and stick is just dragging behind the mouse...

sad.gif

Thanks allot in advance,


Najam D.
oomchu
ok, hopefully this makes sense. Rotation is also called a moment. Moment equals force*(distance from center of gravity). For a slender rod, aka stick, the center of gravity, assuming mass is distributed equally should be the center of the stick...so if you have a 4m stick the center of gravity should be 2 meters from any end. I guess the main thing you would have to figure out is how much force is applied. So if the force is applied at the center of gravity no rotation, or moment, should occur. Hope that makes sense.
najam
QUOTE (oomchu+Jun 11 2006, 01:15 AM)
ok, hopefully this makes sense. Rotation is also called a moment. Moment equals force*(distance from center of gravity). For a slender rod, aka stick, the center of gravity, assuming mass is distributed equally should be the center of the stick...so if you have a 4m stick the center of gravity should be 2 meters from any end. I guess the main thing you would have to figure out is  how much force is applied. So if the force is applied at the center of gravity no rotation, or moment, should occur. Hope that makes sense.

Thanks oomchu,
But im not clear on how you would explain a mouses force on the stick. Also what would need to be done if user applies mouse force at a 45' angle from the stick... like



=========C========= <<< stick
------------------------------*
----------------------------*
--------------------------*
------------------------*
----------------------*
--------------------*
------------------*
----------------*
---------------^ force applied at a angle

C being the center of gravity..
and the "*" represents the angle of the force.

Thank you,


Najam D.
Agwan
If a force "N" is applied at an angle of lets say "theta" degrees starting from straight right, then the force applied on the stick at a lenght "l" from the center point is calculated:

force applied on stick around its axis of momentum = N*sin(theta)*l

This is the force that will make the stick turn.

theta can also be seen as the angle between the stick and the force. If you wanna know the force applied on the stick in its line it is:

force applied along stick = N*cos(theta)

This force will cause the stick to move unless it is stuck at its center of momentum.
PhysOrg scientific forums are totally dedicated to science, physics, and technology. Besides topical forums such as nanotechnology, quantum physics, silicon and III-V technology, applied physics, materials, space and others, you can also join our news and publications discussions. We also provide an off-topic forum category. If you need specific help on a scientific problem or have a question related to physics or technology, visit the PhysOrg Forums. Here you’ll find experts from various fields online every day.
To quit out of "lo-fi" mode and return to the regular forums, please click here.