From 9c91da872554750a9b1d5c7ec16137b779b26187 Mon Sep 17 00:00:00 2001 From: Vojtech Krajnansky Date: Wed, 5 Feb 2025 14:42:50 +0100 Subject: [PATCH] Add info about used transform for RigidBody* methods --- doc/classes/RigidBody2D.xml | 6 ++++++ doc/classes/RigidBody3D.xml | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 1977b238e40..683bf775c63 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -27,6 +27,7 @@ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code]. + [param force] is interpreted in global coordinates and applied as given, without modification by the body's transform. This is equivalent to using [method add_constant_force] at the body's center of mass. @@ -36,6 +37,7 @@ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector2(0, 0)[/code]. + [param force] is interpreted in global coordinates and applied as given, without modification by the body's transform. [param position] is the offset from the body origin in global coordinates. @@ -51,6 +53,7 @@ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + [param force] is interpreted in global coordinates and applied as given, without modification by the body's transform. This is equivalent to using [method apply_force] at the body's center of mass. @@ -60,6 +63,7 @@ Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + [param impulse] is interpreted in global coordinates and applied as given, without modification by the body's transform. This is equivalent to using [method apply_impulse] at the body's center of mass. @@ -69,6 +73,7 @@ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + [param force] is interpreted in global coordinates and applied as given, without modification by the body's transform. [param position] is the offset from the body origin in global coordinates. @@ -79,6 +84,7 @@ Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + [param impulse] is interpreted in global coordinates and applied as given, without modification by the body's transform. [param position] is the offset from the body origin in global coordinates. diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml index de6d5cde3d3..953f0e7dd36 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidBody3D.xml @@ -28,6 +28,7 @@ Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code]. + [param force] is interpreted in global coordinates and applied as given, without modification by the body's transform. This is equivalent to using [method add_constant_force] at the body's center of mass. @@ -37,6 +38,7 @@ Adds a constant positioned force to the body that keeps being applied over time until cleared with [code]constant_force = Vector3(0, 0, 0)[/code]. + [param force] is interpreted in global coordinates and applied as given, without modification by the body's transform. [param position] is the offset from the body origin in global coordinates. @@ -45,6 +47,7 @@ Adds a constant rotational force without affecting position that keeps being applied over time until cleared with [code]constant_torque = Vector3(0, 0, 0)[/code]. + [param torque] is interpreted in global coordinates and applied as given, without modification by the body's transform. @@ -52,6 +55,7 @@ Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + [param force] is interpreted in global coordinates and applied as given, without modification by the body's transform. This is equivalent to using [method apply_force] at the body's center of mass. @@ -61,6 +65,7 @@ Applies a directional impulse without affecting rotation. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + [param impulse] is interpreted in global coordinates and applied as given, without modification by the body's transform. This is equivalent to using [method apply_impulse] at the body's center of mass. @@ -70,6 +75,7 @@ Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + [param force] is interpreted in global coordinates and applied as given, without modification by the body's transform. [param position] is the offset from the body origin in global coordinates. @@ -80,6 +86,7 @@ Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + [param impulse] is interpreted in global coordinates and applied as given, without modification by the body's transform. [param position] is the offset from the body origin in global coordinates. @@ -88,6 +95,7 @@ Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + [param torque] is interpreted in global coordinates and applied as given, without modification by the body's transform. [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia]. @@ -97,6 +105,7 @@ Applies a rotational impulse to the body without affecting the position. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + [param impulse] is interpreted in global coordinates and applied as given, without modification by the body's transform. [b]Note:[/b] [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia].