I'm creating what I believe to be a simple top-down simulation and have come across the recommendation in the user manual to employ a friction joint to apply translational friction, which is desired.
Unfortunately, the manual just says "See b2FrictionJoint.h and ApplyForce.h for details"
There doesn't appear to be a file called ApplyForce.h (unless I missed this file when setting up my project), but I included the friction joint header in my code and declared a joint definition struct to see what was required to set one up. The initialization function calls for the two bodies in order to create a joint, and I'm not sure how a second body would be used in this case. I'm under the belief that this joint will act as a damper for velocity on both axes. None of my objects rotate in this world. So programmable velocity damping is all I'm after.
Still... not sure how to set this up with two bodies if I'm not intending to tie this body to another one. Am I missing a basic concept here? If you've used these joints successfully, let me know what's expected here. Thanks!
Kind Regards,
Seth Gorden
Unfortunately, the manual just says "See b2FrictionJoint.h and ApplyForce.h for details"
There doesn't appear to be a file called ApplyForce.h (unless I missed this file when setting up my project), but I included the friction joint header in my code and declared a joint definition struct to see what was required to set one up. The initialization function calls for the two bodies in order to create a joint, and I'm not sure how a second body would be used in this case. I'm under the belief that this joint will act as a damper for velocity on both axes. None of my objects rotate in this world. So programmable velocity damping is all I'm after.
Still... not sure how to set this up with two bodies if I'm not intending to tie this body to another one. Am I missing a basic concept here? If you've used these joints successfully, let me know what's expected here. Thanks!
Kind Regards,
Seth Gorden