Skip to content
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

Improved description of apply_impulse to clarify the "position" vector #1018

Closed
wants to merge 1 commit into from

Conversation

sdfgeoff
Copy link
Contributor

Minor change to the documentation for apply_impulse, as to me the note on offset being relative was "hidden."

@@ -202,7 +202,7 @@ Called during physics processing, allowing you to read and safely modify the sim

- void **apply_impulse** **(** :ref:`Vector3<class_vector3>` position, :ref:`Vector3<class_vector3>` impulse **)**

Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates.
Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the position are in global coordinates, and the position is relative to the objects origin.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

object's

@akien-mga
Copy link
Member

Changes to the class reference should be made on the source XML in https://github.com/godotengine/godot/tree/master/doc/classes
This file here is auto-generated, as mentioned at the top.

@cbscribe
Copy link
Contributor

Can you make this same change to RigidBody2D?

akien-mga added a commit to godotengine/godot that referenced this pull request Jan 25, 2018
Also enhance RigidBody docs as per godotengine/godot-docs#1018
and fix the version tag in all files (not really stable yet, but it makes no sense
to hardcode rc3 at this stage).
@akien-mga
Copy link
Member

I've merged it in the proper repo as part of d516aab. For RigidBody2D this is not needed as is, as the parameter is named "offset" already so the docs make sense. (But then RigidBody2D and RigidBody re slightly inconsistent with each other).

@akien-mga akien-mga closed this Jan 25, 2018
octetdev2 pushed a commit to octetdev2/godot-tile-module that referenced this pull request Apr 24, 2022
Also enhance RigidBody docs as per godotengine/godot-docs#1018
and fix the version tag in all files (not really stable yet, but it makes no sense
to hardcode rc3 at this stage).
akien-mga added a commit to godotengine/godot-visual-script that referenced this pull request Aug 23, 2022
Also enhance RigidBody docs as per godotengine/godot-docs#1018
and fix the version tag in all files (not really stable yet, but it makes no sense
to hardcode rc3 at this stage).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants