-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Update/fix restitution param desc in physics addons #32341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
examples/jsm/physics/JoltPhysics.js
Outdated
| * @param {Mesh} mesh The mesh to add. | ||
| * @param {number} [mass=0] The mass in kg of the mesh. | ||
| * @param {number} [restitution=0] The restitution/friction of the mesh. | ||
| * @param {number} [restitution=0] The restitution of the mesh. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In very simple words one can distinct both concepts like so:
- Restitution models how "bouncy" objects are when they collide with each other.
- Friction models how object slide against each other.
Is that about right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but friction isn't exposed at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. Would you mind updating the description of restitution to the following:
@param {number} [restitution=0] The restitution of the mesh. Represents how "bouncy" objects are when they collide with each other.
In this way, we have a bit of description about what restitution actually is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about The restitution of the mesh usually from 0 to 1. Restitution is the proportion of energy conserved when colliding with another object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And in the future The frictional coefficient of the mesh, above or equal to 0 where 0 is no friction. When two objects slide against each other there is a frictional force proportional to the normal force between them and this value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then maybe like so?
The amount of energy conserved when colliding with another object. Simply speaking, it defines how "bouncy" objects are when they collide with each other.
I would like to add one sentence that defines it as simple as possible for developers who do not know much about physics yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I've written is accurate and concise, for wadafak is this (probably more for people who don't speak English rather than poor physics) I think it should be
The restitution of the mesh usually from 0 to 1. This is how "bouncy" an object is
The friction of the mesh, above or equal to 0, where 0 is no friction. Friction is a force applied when objects slide against each other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TBH, I prefer the version in #32341 (comment) which is a it longer but more clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think "on colliding with eachother" adds anything, but I am impartial to the extra words. We should keep the range 0 to 1 though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mugen87 see update
friction in param desc of physics AddMesh
Uh oh!
There was an error while loading. Please reload this page.