How to swing a baseball bat?

benlora11

23-09-2008 11:05:37

Hi guys,

I have no idea how to simulate swing a baseball bat. Any idea would be most welcome.

The only way i can think of is that, do not apply gravity to the bat, set a fix point (dont to do that?) and hang the bat by a invisible string(dont know how..) and add force on the bottom of the bat (dont know how aswell...). the fix point connected with the invisible string will stop the bat fly away and make a circular swing. but there will be no force to stop the swing then....

anyway pleas give some suggestion, thanks

Bryan

NoodlesOnMyBack

23-09-2008 22:25:11

Probably a stab in the dark, but cant you just do some bone animation of the bat to the model using 3d Max or wathever you use? Then you atach some primitive shapes as the collision to the bat mesh (a Cillinder perhabs?), when the bat is in animation mode the bat will move like the swing animation (you have to code this so the physics shape follow the position of the bat), then if it hits the ball you can make the bat to fly with gravity or whathever you like...