wmaass Posted September 12, 2011 Share Posted September 12, 2011 Hi All, Putting together a little miniputt game for use in a full size golf simulator. The sim has a sensor that measures all of the launch conditions of any shot. I want to take the measured ball velocity and translate it into something that I can use with AddForce. Looking around on the net I found: "One Newton (N) of force is defined as the amount of force needed to accelerate 1 kilogram (kg) of mass at a rate of 1 meter per second squared (m/s2)." A golf ball is roughly 0.046 kg, therefore if I have a measured ball speed of say 5 mps then: force = 0.046 * 5.0^2 So then I can add force like so: AddBodyForce ballBody, Vec3(0, 0, 1.15), 0 Does this sound right? Quote Link to comment Share on other sites More sharing options...
paramecij Posted September 12, 2011 Share Posted September 12, 2011 It sounds about right (for the amount of force part).. but you also need to consider direction when adding force to body.. use a normalized vector to specify direction and then multiply it with the force scalar... but don't be surprised if it doesn't look right, game physics often don't look good if based on real world values Quote Link to comment Share on other sites More sharing options...
wmaass Posted September 12, 2011 Author Share Posted September 12, 2011 It sounds about right (for the amount of force part).. but you also need to consider direction when adding force to body.. use a normalized vector to specify direction and then multiply it with the force scalar... but don't be surprised if it doesn't look right, game physics often don't look good if based on real world values Thanks for the reply. I concede that I might have to play with it for it to "look" right. No big deal. Quote Link to comment Share on other sites More sharing options...
wmaass Posted September 14, 2011 Author Share Posted September 14, 2011 Why is it that dealing with a simple rolling ball is so awkward for these complex physics engines? Anyway, does anyone know if you can remove forces acting on a body or just make it sleep? I ask this so that I can stop my ball from rolling when it's velocity is below a certain thresh. EDIT: I didn't see SetBodyVelocity right away, looks like I can use that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.