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

Fix external force/torque instructions #5483

Merged
merged 8 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/guide/the-3d-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ In order for the all three dimensions to scale by the same amount, or in other w
### Applying a Force to a Solid Object with Physics

To apply a force to an object, place the mouse pointer where the force will apply, hold down the <kbd>alt</kbd> key (<kbd>⌥ option</kbd> on some Apple keyboards) and left mouse button together while dragging the mouse.
Linux users should also hold down the <kbd>ctrl</kbd> key together with the <kbd>alt</kbd> key (<kbd>⌥ option</kbd> on some Apple keyboards).
In Linux, depending on your window manager, it might be necessary to hold down the <kbd>ctrl</kbd> key together with the <kbd>alt</kbd> key (<kbd>⌥ option</kbd> on some Apple keyboards).
This way your are drawing a 3D-vector whose end is located on the plane parallel to the view which passes through the point of application.
The force is computed as follows: *F* [N] = `WorldInfo.dragForceScale` * `Solid.mass` * *d*<sup>3</sup>, where *d* corresponds to the vector created by dragging the mouse (in meters).

### Applying a Torque to a Solid Object with Physics

To apply a torque to an object, place the mouse pointer on it, hold down the <kbd>alt</kbd> key (<kbd>⌥ option</kbd> on some Apple keyboards) and right mouse button together while dragging the mouse.
Linux users should also hold down the <kbd>ctrl</kbd> key together with the <kbd>alt</kbd> key (<kbd>⌥ option</kbd> on some Apple keyboards).
In Linux, depending on your window manager, it might be necessary to hold down the <kbd>ctrl</kbd> key together with the <kbd>alt</kbd> key (<kbd>⌥ option</kbd> on some Apple keyboards).
Also, macOS users with a one-button mouse should hold down the <kbd>ctrl</kbd> key to emulate the right mouse button.
This way your are drawing a 3D-vector with origin the center of mass and whose end is located on the plane parallel to the view which passes through this center.
The object is prompted to turn around the vector direction, the torque is computed as follows: *T* [Nm] = `WorldInfo.dragTorqueScale` * `Solid.mass` * *d*<sup>3</sup>, where *d* corresponds to the vector created by dragging the mouse (in meters).
Expand Down
14 changes: 7 additions & 7 deletions resources/translations/wb_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3792,10 +3792,6 @@ The following file formats are supported:
<source>How do I apply a force or a torque to an object?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key, the Control key (Ctrl) and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key, the Control key (Ctrl) and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -4248,6 +4244,10 @@ As a consequence, some project-related functionalities may not work.</source>
<source>Save Anyway</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WbMatter</name>
Expand Down Expand Up @@ -6824,15 +6824,15 @@ Please save the current world to get rid of this message.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Couldn&apos;t write jsTemplateFilled to disk.</source>
<source>failed to import JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to import JavaScript template: %1</source>
<source>failed to execute JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to execute JavaScript template: %1</source>
<source>Couldn&apos;t write jsTemplateFilled in %1</source>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
14 changes: 7 additions & 7 deletions resources/translations/wb_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3789,10 +3789,6 @@ The following file formats are supported:
<source>How do I apply a force or a torque to an object?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key, the Control key (Ctrl) and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key, the Control key (Ctrl) and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -4245,6 +4241,10 @@ As a consequence, some project-related functionalities may not work.</source>
<source>Save Anyway</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WbMatter</name>
Expand Down Expand Up @@ -6821,15 +6821,15 @@ Please save the current world to get rid of this message.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Couldn&apos;t write jsTemplateFilled to disk.</source>
<source>failed to import JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to import JavaScript template: %1</source>
<source>failed to execute JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to execute JavaScript template: %1</source>
<source>Couldn&apos;t write jsTemplateFilled in %1</source>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
14 changes: 7 additions & 7 deletions resources/translations/wb_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3794,10 +3794,6 @@ The following file formats are supported:
<source>How do I apply a force or a torque to an object?</source>
<translation>Comment appliquer une force ou un torque sur un object?</translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key, the Control key (Ctrl) and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key, the Control key (Ctrl) and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -4250,6 +4246,10 @@ As a consequence, some project-related functionalities may not work.</source>
<source>Save Anyway</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WbMatter</name>
Expand Down Expand Up @@ -6826,15 +6826,15 @@ Please save the current world to get rid of this message.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Couldn&apos;t write jsTemplateFilled to disk.</source>
<source>failed to import JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to import JavaScript template: %1</source>
<source>failed to execute JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to execute JavaScript template: %1</source>
<source>Couldn&apos;t write jsTemplateFilled in %1</source>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
14 changes: 7 additions & 7 deletions resources/translations/wb_generic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3789,10 +3789,6 @@ The following file formats are supported:
<source>Open the Cyberbotics website.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key, the Control key (Ctrl) and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key, the Control key (Ctrl) and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -4245,6 +4241,10 @@ As a consequence, some project-related functionalities may not work.</source>
<source>Save Anyway</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WbMatter</name>
Expand Down Expand Up @@ -6821,15 +6821,15 @@ Please save the current world to get rid of this message.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Couldn&apos;t write jsTemplateFilled to disk.</source>
<source>failed to import JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to import JavaScript template: %1</source>
<source>failed to execute JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to execute JavaScript template: %1</source>
<source>Couldn&apos;t write jsTemplateFilled in %1</source>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
14 changes: 7 additions & 7 deletions resources/translations/wb_it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3803,10 +3803,6 @@ The following file formats are supported:
<source>Open the Cyberbotics website.</source>
<translation>Apri il sito web di Cyberbotics.</translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key, the Control key (Ctrl) and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key, the Control key (Ctrl) and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -4259,6 +4255,10 @@ As a consequence, some project-related functionalities may not work.</source>
<source>Save Anyway</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WbMatter</name>
Expand Down Expand Up @@ -6844,15 +6844,15 @@ Please save the current world to get rid of this message.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Couldn&apos;t write jsTemplateFilled to disk.</source>
<source>failed to import JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to import JavaScript template: %1</source>
<source>failed to execute JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to execute JavaScript template: %1</source>
<source>Couldn&apos;t write jsTemplateFilled in %1</source>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
14 changes: 7 additions & 7 deletions resources/translations/wb_ja_JP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3789,10 +3789,6 @@ The following file formats are supported:
<source>How do I apply a force or a torque to an object?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key, the Control key (Ctrl) and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key, the Control key (Ctrl) and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse.</source>
<translation type="unfinished"></translation>
Expand Down Expand Up @@ -4245,6 +4241,10 @@ As a consequence, some project-related functionalities may not work.</source>
<source>Save Anyway</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>&lt;strong&gt;Force:&lt;/strong&gt;&lt;br/&gt; Place the mouse pointer where the force will apply and hold down the Alt key and the left mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.&lt;br/&gt;&lt;br/&gt; &lt;strong&gt;Torque:&lt;/strong&gt;&lt;br/&gt;Place the mouse pointer on the object and hold down the Alt key and the right mouse button together while dragging the mouse. In some window managers it might be necessary to also hold the Control (ctrl) key together with the Alt key.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>WbMatter</name>
Expand Down Expand Up @@ -6821,15 +6821,15 @@ Please save the current world to get rid of this message.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Couldn&apos;t write jsTemplateFilled to disk.</source>
<source>failed to import JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to import JavaScript template: %1</source>
<source>failed to execute JavaScript template: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>failed to execute JavaScript template: %1</source>
<source>Couldn&apos;t write jsTemplateFilled in %1</source>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
Loading