Jump to content

Physics Question


wmaass
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...