From 38c634df75ea803d0218238b5f2ace77a8bf01b9 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Tue, 3 Sep 2024 04:28:31 -0700 Subject: [PATCH] Add units and docs for Joint3D/2D stiffness and damping --- doc/classes/ConeTwistJoint3D.xml | 6 +- doc/classes/DampedSpringJoint2D.xml | 8 +- doc/classes/Generic6DOFJoint3D.xml | 193 ++++++++++++------ doc/classes/HingeJoint3D.xml | 5 +- doc/classes/PinJoint2D.xml | 2 +- doc/classes/PinJoint3D.xml | 10 +- doc/classes/SliderJoint3D.xml | 37 ++-- .../physics/joints/damped_spring_joint_2d.cpp | 4 +- scene/2d/physics/joints/pin_joint_2d.cpp | 2 +- .../3d/physics/joints/cone_twist_joint_3d.cpp | 4 +- .../physics/joints/generic_6dof_joint_3d.cpp | 48 ++--- scene/3d/physics/joints/hinge_joint_3d.cpp | 4 +- scene/3d/physics/joints/pin_joint_3d.cpp | 4 +- scene/3d/physics/joints/slider_joint_3d.cpp | 24 +-- 14 files changed, 208 insertions(+), 143 deletions(-) diff --git a/doc/classes/ConeTwistJoint3D.xml b/doc/classes/ConeTwistJoint3D.xml index 632b512497b8..d8ac589f1ca6 100644 --- a/doc/classes/ConeTwistJoint3D.xml +++ b/doc/classes/ConeTwistJoint3D.xml @@ -31,10 +31,12 @@ The higher, the faster. - Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + The amount of relaxation, or inverse damping, applied to angular velocity when rotated beyond the swing span and/or twist span. It is measured in rad/N/m/s, or rad·s/kg/m² in SI base units. Unlike most joints in Godot which use damping, ConeTwistJoint3D uses inverse damping (relaxation), so higher values result in less damping and lower values result in more damping. + Higher relaxation values make the joint more elastic or bouncy. Lower values result in a smoother, more gradual reduction in swing- and twist-speed-difference velocity, preventing oscillations or rapid rotation as the joint returns to its span limits. - The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. + The stiffness factor applied to rotation beyond the swing span and twist span limits. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. + Higher angular stiffness results in a harder limit, which more strongly resists rotation beyond the limit. Lower values make the limit softer and more flexible. Swing is rotation from side to side, around the axis perpendicular to the twist axis. diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml index 4bb80c84e526..d2fea7150228 100644 --- a/doc/classes/DampedSpringJoint2D.xml +++ b/doc/classes/DampedSpringJoint2D.xml @@ -10,16 +10,18 @@ - The spring joint's damping ratio. A value between [code]0[/code] and [code]1[/code]. When the two bodies move into different directions the system tries to align them to the spring axis again. A high [member damping] value forces the attached bodies to align faster. + The amount of damping applied to by the spring joint. It is measured in kg/s. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the spring returns to its equilibrium rest length, preventing oscillations or rapid movement. Lower values make the spring more elastic or bouncy. The spring joint's maximum length. The two attached bodies cannot stretch it past this value. - When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. + When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length, known as the equilibrium length or rest length. - The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. + The stiffness of the spring joint. It is measured in kg/s². The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. + Higher linear stiffness results in a more rigid spring, which more strongly resists being compressed or stretched away from its equilibrium rest length. Lower values make the spring more elastic or bouncy. diff --git a/doc/classes/Generic6DOFJoint3D.xml b/doc/classes/Generic6DOFJoint3D.xml index 2482defd0b25..a722e846d731 100644 --- a/doc/classes/Generic6DOFJoint3D.xml +++ b/doc/classes/Generic6DOFJoint3D.xml @@ -91,32 +91,34 @@ - The amount of rotational damping across the X axis. - The lower, the longer an impulse from one side takes to travel to the other side. + The amount of damping applied to X angular velocity when a joint is rotated beyond the angular limit around the X axis. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. + Higher angular damping results in a smoother, more gradual reduction in angular velocity, preventing oscillations or rapid rotation as the joint returns to its angular limit. Lower values make the joint more elastic or bouncy. - If [code]true[/code], rotation across the X axis is limited. + If [code]true[/code], rotation around the X axis is limited. - When rotating across the X axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + When rotating around the X axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. - The maximum amount of force that can occur, when rotating around the X axis. + The maximum amount of torque (angular force) that the limit can apply to angular velocity around the X axis. It is measured in Nm, or kg·m²/s² in SI base units. - The minimum rotation in negative direction to break loose and rotate around the X axis. + The maximum rotation in radians in the negative direction around the X axis that connected bodies may freely rotate without the limit applying stiffness torque to bring them back within the lower and upper limits. If both the lower and upper angular X limits are set to zero, the joint is fixed around the angular X axis. - The amount of rotational restitution across the X axis. The lower, the more restitution occurs. + The amount of rotational restitution across the X axis. The lower, the more restitution occurs. Restitution is a dimensionless value. - The speed of all rotations across the X axis. + The stiffness factor applied to rotation beyond the angular limit around the X axis. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. + Higher angular stiffness results in a harder limit, which more strongly resists rotation beyond the limit. Lower values make the limit softer and more flexible. - The minimum rotation in positive direction to break loose and rotate around the X axis. + The maximum rotation in radians in the positive direction around the X axis that connected bodies may freely rotate without the limit applying stiffness torque to bring them back within the lower and upper limits. If both the lower and upper angular X limits are set to zero, the joint is fixed around the angular X axis. - The amount of rotational damping across the Y axis. The lower, the more damping occurs. + The amount of damping applied to Y angular velocity when a joint is rotated beyond the angular limit around the Y axis. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. + Higher angular damping results in a smoother, more gradual reduction in angular velocity, preventing oscillations or rapid rotation as the joint returns to its angular limit. Lower values make the joint more elastic or bouncy. If [code]true[/code], rotation across the Y axis is limited. @@ -125,22 +127,24 @@ When rotating across the Y axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. - The maximum amount of force that can occur, when rotating around the Y axis. + The maximum amount of torque (angular force) that the limit can apply to angular velocity around the Y axis. It is measured in Nm, or kg·m²/s² in SI base units. - The minimum rotation in negative direction to break loose and rotate around the Y axis. + The maximum rotation in radians in the negative direction around the Y axis that connected bodies may freely rotate without the limit applying stiffness torque to bring them back within the lower and upper limits. If both the lower and upper angular Y limits are set to zero, the joint is fixed around the angular Y axis. - The amount of rotational restitution across the Y axis. The lower, the more restitution occurs. + The amount of rotational restitution across the Y axis. The lower, the more restitution occurs. Restitution is a dimensionless value. - The speed of all rotations across the Y axis. + The stiffness factor applied to rotation beyond the angular limit around the Y axis. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. + Higher angular stiffness results in a harder limit, which more strongly resists rotation beyond the limit. Lower values make the limit softer and more flexible. - The minimum rotation in positive direction to break loose and rotate around the Y axis. + The maximum rotation in radians in the positive direction around the Y axis that connected bodies may freely rotate without the limit applying stiffness torque to bring them back within the lower and upper limits. If both the lower and upper angular Y limits are set to zero, the joint is fixed around the angular Y axis. - The amount of rotational damping across the Z axis. The lower, the more damping occurs. + The amount of damping applied to Z angular velocity when a joint is rotated beyond the angular limit around the Z axis. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. + Higher angular damping results in a smoother, more gradual reduction in angular velocity, preventing oscillations or rapid rotation as the joint returns to its angular limit. Lower values make the joint more elastic or bouncy. If [code]true[/code], rotation across the Z axis is limited. @@ -149,127 +153,149 @@ When rotating across the Z axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. - The maximum amount of force that can occur, when rotating around the Z axis. + The maximum amount of torque (angular force) that the limit can apply to angular velocity around the Z axis. It is measured in Nm, or kg·m²/s² in SI base units. - The minimum rotation in negative direction to break loose and rotate around the Z axis. + The maximum rotation in radians in the negative direction around the Z axis that connected bodies may freely rotate without the limit applying stiffness torque to bring them back within the lower and upper limits. If both the lower and upper angular Z limits are set to zero, the joint is fixed around the angular Z axis. - The amount of rotational restitution across the Z axis. The lower, the more restitution occurs. + The amount of rotational restitution across the Z axis. The lower, the more restitution occurs. Restitution is a dimensionless value. - The speed of all rotations across the Z axis. + The stiffness factor applied to rotation beyond the angular limit around the Z axis. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. + Higher angular stiffness results in a harder limit, which more strongly resists rotation beyond the limit. Lower values make the limit softer and more flexible. - The minimum rotation in positive direction to break loose and rotate around the Z axis. + The maximum rotation in radians in the positive direction around the Z axis that connected bodies may freely rotate without the limit applying stiffness torque to bring them back within the lower and upper limits. If both the lower and upper angular Z limits are set to zero, the joint is fixed around the angular Z axis. - If [code]true[/code], a rotating motor at the X axis is enabled. + If [code]true[/code], then there is an angular motor on the X axis. More generally, the joint's rotation around the X axis will have a joint drive that targets the given angular velocity and tries to reach it while staying within the force limits. - Maximum acceleration for the motor at the X axis. + The maximum amount of torque (angular force) that the motor can apply to angular velocity around the X axis. It is measured in Nm, or kg·m²/s² in SI base units. - Target speed for the motor at the X axis. + Target speed for the angular motor in radians per second around the X axis. - If [code]true[/code], a rotating motor at the Y axis is enabled. + If [code]true[/code], then there is an angular motor on the Y axis. More generally, the joint's rotation around the Y axis will have a joint drive that targets the given angular velocity and tries to reach it while staying within the force limits. - Maximum acceleration for the motor at the Y axis. + The maximum amount of torque (angular force) that the motor can apply to angular velocity around the X axis. It is measured in Nm, or kg·m²/s² in SI base units. - Target speed for the motor at the Y axis. + Target speed for the angular motor in radians per second around the Y axis. - If [code]true[/code], a rotating motor at the Z axis is enabled. + If [code]true[/code], then there is an angular motor on the Z axis. More generally, the joint's rotation around the Z axis will have a joint drive that targets the given angular velocity and tries to reach it while staying within the force limits. - Maximum acceleration for the motor at the Z axis. + The maximum amount of torque (angular force) that the motor can apply to angular velocity around the X axis. It is measured in Nm, or kg·m²/s² in SI base units. - Target speed for the motor at the Z axis. + Target speed for the angular motor in radians per second around the Z axis. + The amount of damping applied to X angular velocity when a joint drive acts as a spring around the X axis. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. + If [code]true[/code], then there is an angular spring on the X axis. More generally, the joint's rotation around the X axis will have a joint drive that targets the equilibrium point and attempts to move towards it with the given stiffness and damping values. + The equilibrium point of the spring in radians around the X axis. + The stiffness of the spring around the X axis. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. + Higher angular stiffness results in a more rigid spring, which more strongly resists being bent away from its equilibrium point. Lower values make the spring more elastic or bouncy. + The amount of damping applied to Y angular velocity when a joint drive acts as a spring around the Y axis. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. + If [code]true[/code], then there is an angular spring on the Y axis. More generally, the joint's rotation around the Y axis will have a joint drive that targets the equilibrium point and attempts to move towards it with the given stiffness and damping values. + The equilibrium point of the spring in radians around the Y axis. + The stiffness of the spring around the Y axis. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. + Higher angular stiffness results in a more rigid spring, which more strongly resists being bent away from its equilibrium point. Lower values make the spring more elastic or bouncy. + The amount of damping applied to Z angular velocity when a joint drive acts as a spring around the Z axis. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. + If [code]true[/code], then there is an angular spring on the Z axis. More generally, the joint's rotation around the Z axis will have a joint drive that targets the equilibrium point and attempts to move towards it with the given stiffness and damping values. + The equilibrium point of the spring in radians around the Z axis. + The stiffness of the spring around the Z axis. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. + Higher angular stiffness results in a more rigid spring, which more strongly resists being bent away from its equilibrium point. Lower values make the spring more elastic or bouncy. - The amount of damping that happens at the X motion. + The amount of damping applied to X linear velocity when a joint is moved beyond the linear limit along the X axis. It is measured in N·s/m, or kg/s in SI base units. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the joint returns to its limit, preventing oscillations or rapid movement. Lower values make the joint more elastic or bouncy. If [code]true[/code], the linear motion across the X axis is limited. - The minimum difference between the pivot points' X axis. + The maximum distance in meters in the negative direction on the X axis that connected bodies may freely move without the limit applying stiffness force to bring them back within the lower and upper limits. If both the lower and upper linear X limits are set to zero, the joint is fixed along the linear X axis. - The amount of restitution on the X axis movement. The lower, the more momentum gets lost. + The amount of restitution on the X axis movement. The lower, the more momentum gets lost. Restitution is a dimensionless value. - A factor applied to the movement across the X axis. The lower, the slower the movement. + The stiffness factor applied to movement beyond the linear limit along the X axis. It is measured in N/m, or kg/s² in SI base units. + Higher linear stiffness results in a harder limit, which more strongly resists movement beyond the limit. Lower values make the limit softer and more flexible. - The maximum difference between the pivot points' X axis. + The maximum distance in meters in the positive direction on the X axis that connected bodies may freely move without the limit applying stiffness force to bring them back within the lower and upper limits. If both the lower and upper linear X limits are set to zero, the joint is fixed along the linear X axis. - The amount of damping that happens at the Y motion. + The amount of damping applied to Y linear velocity when a joint is moved beyond the linear limit along the Y axis. It is measured in N·s/m, or kg/s in SI base units. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the joint returns to its limit, preventing oscillations or rapid movement. Lower values make the joint more elastic or bouncy. If [code]true[/code], the linear motion across the Y axis is limited. - The minimum difference between the pivot points' Y axis. + The maximum distance in meters in the negative direction on the Y axis that connected bodies may freely move without the limit applying stiffness force to bring them back within the lower and upper limits. If both the lower and upper linear Y limits are set to zero, the joint is fixed along the linear Y axis. - The amount of restitution on the Y axis movement. The lower, the more momentum gets lost. + The amount of restitution on the Y axis movement. The lower, the more momentum gets lost. Restitution is a dimensionless value. - A factor applied to the movement across the Y axis. The lower, the slower the movement. + The stiffness factor applied to movement beyond the linear limit along the Y axis. It is measured in N/m, or kg/s² in SI base units. + Higher linear stiffness results in a harder limit, which more strongly resists movement beyond the limit. Lower values make the limit softer and more flexible. - The maximum difference between the pivot points' Y axis. + The maximum distance in meters in the positive direction on the Y axis that connected bodies may freely move without the limit applying stiffness force to bring them back within the lower and upper limits. If both the lower and upper linear Y limits are set to zero, the joint is fixed along the linear Y axis. - The amount of damping that happens at the Z motion. + The amount of damping applied to Z linear velocity when a joint is moved beyond the linear limit along the Z axis. It is measured in N·s/m, or kg/s in SI base units. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the joint returns to its limit, preventing oscillations or rapid movement. Lower values make the joint more elastic or bouncy. If [code]true[/code], the linear motion across the Z axis is limited. - The minimum difference between the pivot points' Z axis. + The maximum distance in meters in the negative direction on the Z axis that connected bodies may freely move without the limit applying stiffness force to bring them back within the lower and upper limits. If both the lower and upper linear Z limits are set to zero, the joint is fixed along the linear Z axis. - The amount of restitution on the Z axis movement. The lower, the more momentum gets lost. + The amount of restitution on the Z axis movement. The lower, the more momentum gets lost. Restitution is a dimensionless value. - A factor applied to the movement across the Z axis. The lower, the slower the movement. + The stiffness factor applied to movement beyond the linear limit along the Z axis. It is measured in N/m, or kg/s² in SI base units. + Higher linear stiffness results in a harder limit, which more strongly resists movement beyond the limit. Lower values make the limit softer and more flexible. - The maximum difference between the pivot points' Z axis. + The maximum distance in meters in the positive direction on the Z axis that connected bodies may freely move without the limit applying stiffness force to bring them back within the lower and upper limits. If both the lower and upper linear Z limits are set to zero, the joint is fixed along the linear Z axis. - If [code]true[/code], then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits. + If [code]true[/code], then there is a linear motor on the X axis. More generally, the joint's X axis will have a joint drive that targets the given linear velocity and attempts to reach it while staying within the force limits. The maximum force the linear motor can apply on the X axis while trying to reach the target velocity. @@ -278,7 +304,7 @@ The speed that the linear motor will attempt to reach on the X axis. - If [code]true[/code], then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits. + If [code]true[/code], then there is a linear motor on the Y axis. More generally, the joint's Y axis will have a joint drive that targets the given linear velocity and attempts to reach it while staying within the force limits. The maximum force the linear motor can apply on the Y axis while trying to reach the target velocity. @@ -287,7 +313,7 @@ The speed that the linear motor will attempt to reach on the Y axis. - If [code]true[/code], then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits. + If [code]true[/code], then there is a linear motor on the Z axis. More generally, the joint's Z axis will have a joint drive that targets the given linear velocity and attempts to reach it while staying within the force limits. The maximum force the linear motor can apply on the Z axis while trying to reach the target velocity. @@ -296,109 +322,142 @@ The speed that the linear motor will attempt to reach on the Z axis. + The amount of damping applied to X linear velocity when a joint drive acts as a spring along the X axis. It is measured in N·s/m, or kg/s in SI base units. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the spring returns to its equilibrium point, preventing oscillations or rapid movement. Lower values make the spring more elastic or bouncy. + If [code]true[/code], then there is a linear spring on the X axis. More generally, the joint's X axis will have a joint drive that targets the equilibrium point and attempts to move towards it with the given stiffness and damping values. + The equilibrium point of the spring in meters along the X axis. + The stiffness of the spring along the X axis. It is measured in N/m, or kg/s² in SI base units. + Higher linear stiffness results in a more rigid spring, which more strongly resists being compressed or stretched away from its equilibrium point. Lower values make the spring more elastic or bouncy. + The amount of damping applied to Y linear velocity when a joint drive acts as a spring along the Y axis. It is measured in N·s/m, or kg/s in SI base units. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the spring returns to its equilibrium point, preventing oscillations or rapid movement. Lower values make the spring more elastic or bouncy. + If [code]true[/code], then there is a linear spring on the Y axis. More generally, the joint's Y axis will have a joint drive that targets the equilibrium point and attempts to move towards it with the given stiffness and damping values. + The equilibrium point of the spring in meters along the Y axis. + The stiffness of the spring along the Y axis. It is measured in N/m, or kg/s² in SI base units. + Higher linear stiffness results in a more rigid spring, which more strongly resists being compressed or stretched away from its equilibrium point. Lower values make the spring more elastic or bouncy. + The amount of damping applied to Z linear velocity when a joint drive acts as a spring along the Z axis. It is measured in N·s/m, or kg/s in SI base units. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the spring returns to its equilibrium point, preventing oscillations or rapid movement. Lower values make the spring more elastic or bouncy. + If [code]true[/code], then there is a linear spring on the Z axis. More generally, the joint's Z axis will have a joint drive that targets the equilibrium point and attempts to move towards it with the given stiffness and damping values. + The equilibrium point of the spring in meters along the Z axis. + The stiffness of the spring along the Z axis. It is measured in N/m, or kg/s² in SI base units. + Higher linear stiffness results in a more rigid spring, which more strongly resists being compressed or stretched away from its equilibrium point. Lower values make the spring more elastic or bouncy. - The minimum difference between the pivot points' axes. + The maximum distance in meters in the negative direction that connected bodies may freely move without the limit applying stiffness force to bring them back within the lower and upper limits. If both the lower and upper limits are set to zero, the joint is fixed along that axis. - The maximum difference between the pivot points' axes. + The maximum distance in meters in the positive direction that connected bodies may freely move without the limit applying stiffness force to bring them back within the lower and upper limits. If both the lower and upper limits are set to zero, the joint is fixed along that axis. - A factor applied to the movement across the axes. The lower, the slower the movement. + The stiffness factor applied to movement beyond the linear limit along the Y axis. It is measured in N/m, or kg/s² in SI base units. + Higher linear stiffness results in a harder limit, which more strongly resists movement beyond the limit. Lower values make the limit softer and more flexible. - The amount of restitution on the axes' movement. The lower, the more momentum gets lost. + The amount of restitution on the axes' movement. The lower, the more momentum gets lost. Restitution is a dimensionless value. - The amount of damping that happens at the linear motion across the axes. + The amount of damping applied to linear velocity when a joint is moved beyond the linear limit. It is measured in N·s/m, or kg/s in SI base units. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the joint returns to its limit, preventing oscillations or rapid movement. Lower values make the joint more elastic or bouncy. - The velocity the linear motor will try to reach. + The speed that the linear motor will attempt to reach on the axes. - The maximum force the linear motor will apply while trying to reach the velocity target. + The maximum force the linear motor can apply on the axes while trying to reach the target velocity. + The stiffness of the spring in linear directions. It is measured in N/m, or kg/s² in SI base units. + Higher linear stiffness results in a more rigid spring, which more strongly resists being compressed or stretched away from its equilibrium point. Lower values make the spring more elastic or bouncy. + The amount of damping applied to linear velocity when a joint drive acts as a spring. It is measured in N·s/m, or kg/s in SI base units. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the spring returns to its equilibrium point, preventing oscillations or rapid movement. Lower values make the spring more elastic or bouncy. + The equilibrium point of the spring in linear directions. It is measured in meters. - The minimum rotation in negative direction to break loose and rotate around the axes. + The maximum rotation in radians in the negative direction that connected bodies may freely rotate without the limit applying stiffness torque to bring them back within the lower and upper limits. If both the lower and upper limits are set to zero, the joint is fixed around that axis. - The minimum rotation in positive direction to break loose and rotate around the axes. + The maximum rotation in radians in the positive direction that connected bodies may freely rotate without the limit applying stiffness torque to bring them back within the lower and upper limits. If both the lower and upper limits are set to zero, the joint is fixed around that axis. - The speed of all rotations across the axes. + The stiffness factor applied to rotation beyond the angular limit. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. - The amount of rotational damping across the axes. The lower, the more damping occurs. + The amount of damping applied to angular velocity when a joint is rotated beyond the angular limit. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. + Higher angular damping results in a smoother, more gradual reduction in angular velocity, preventing oscillations or rapid rotation as the joint returns to its angular limit. Lower values make the joint more elastic or bouncy. - The amount of rotational restitution across the axes. The lower, the more restitution occurs. + The amount of rotational restitution. The lower, the more restitution occurs. Restitution is a dimensionless value. - The maximum amount of force that can occur, when rotating around the axes. + The maximum amount of torque (angular force) that the limit can apply to angular velocity. It is measured in Nm, or kg·m²/s² in SI base units. When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. - Target speed for the motor at the axes. + Target speed for the angular motor in radians per second. - Maximum acceleration for the motor at the axes. + The maximum amount of torque (angular force) that the motor can apply to angular velocity. It is measured in Nm, or kg·m²/s² in SI base units. + The stiffness of the spring around the axes. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. + Higher angular stiffness results in a more rigid spring, which more strongly resists being bent away from its equilibrium point. Lower values make the spring more elastic or bouncy. + The amount of damping applied to angular velocity when a joint drive acts as a spring. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. + Higher angular damping results in a smoother, more gradual reduction in angular velocity, preventing oscillations or rapid rotation as the spring returns to its equilibrium point. Lower values make the spring more elastic or bouncy. + The equilibrium point of the spring around the axes. It is measured in radians. Represents the size of the [enum Param] enum. - If enabled, linear motion is possible within the given limits. + If enabled for some or all axes, linear motion across these axes is limited. - If enabled, rotational motion is possible within the given limits. + If enabled for some or all axes, rotation across these axes is limited. + If enabled for some or all axes, there is a linear spring across these axes. More generally, the joint's linear motion along these axes will have a spring that targets the equilibrium point and attempts to move towards it with the given stiffness and damping values. + If enabled for some or all axes, there is an angular spring across these axes. More generally, the joint's rotation around these axes will have a spring that targets the equilibrium point and attempts to move towards it with the given stiffness and damping values. - If enabled, there is a rotational motor across these axes. + If enabled for some or all axes, there is a rotational or angular motor across these axes. More generally, the joint's rotation around these axes will have a joint drive that targets the given angular velocity and tries to reach it while staying within the force limits. - If enabled, there is a linear motor across these axes. + If enabled for some or all axes, there is a linear motor across these axes. More generally, the joint's linear motion along these axes will have a joint drive that targets the given linear velocity and tries to reach it while staying within the force limits. Represents the size of the [enum Flag] enum. diff --git a/doc/classes/HingeJoint3D.xml b/doc/classes/HingeJoint3D.xml index f794853cafa3..138fc1666420 100644 --- a/doc/classes/HingeJoint3D.xml +++ b/doc/classes/HingeJoint3D.xml @@ -51,9 +51,12 @@ The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. - The lower this value, the more the rotation gets slowed down. + The amount of relaxation, or inverse damping, applied to angular velocity when the hinge is rotated beyond the angular limit around the Z axis. It is measured in rad/N/m/s, or rad·s/kg/m² in SI base units. Unlike most joints in Godot which use damping, HingeJoint3D uses inverse damping (relaxation), so higher values result in less damping and lower values result in more damping. + Higher relaxation values make the joint more elastic or bouncy. Lower values result in a smoother, more gradual reduction in angular velocity, preventing oscillations or rapid rotation as the joint returns to its angular limit. + The stiffness factor applied to rotation beyond the hinge's angular limit around the Z axis. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. + Higher angular stiffness results in a harder limit, which more strongly resists rotation beyond the limit. Lower values make the limit softer and more flexible. The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml index a252f603122a..6158385bb87b 100644 --- a/doc/classes/PinJoint2D.xml +++ b/doc/classes/PinJoint2D.xml @@ -25,7 +25,7 @@ Target speed for the motor. In radians per second. - The higher this value, the more the bond to the pinned partner can flex. + The higher this value, the more the bond to the pinned partner can flex. Lower values are stiffer, while higher values are softer. It is measured in s²/kg. diff --git a/doc/classes/PinJoint3D.xml b/doc/classes/PinJoint3D.xml index 9009f0b65865..ba15845846b3 100644 --- a/doc/classes/PinJoint3D.xml +++ b/doc/classes/PinJoint3D.xml @@ -30,10 +30,11 @@ The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. - The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. + The amount of damping applied to linear velocity. It is measured in N·s/m, or kg/s in SI base units. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the joint returns to its limit, preventing oscillations or rapid movement. Lower values make the joint more elastic or bouncy. - If above 0, this value is the maximum value for an impulse that this Joint3D produces. + If above 0, this value is the maximum value for an impulse that this Joint3D produces. It is measured in N·s, or kg·m/s in SI base units. @@ -41,10 +42,11 @@ The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. - The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. + The amount of damping applied to linear velocity. It is measured in N·s/m, or kg/s in SI base units. + Higher linear damping results in a more gradual reduction in linear velocity, creating smoother, gentler behavior as the joint returns to its limit, preventing oscillations or rapid movement. Lower values make the joint more elastic or bouncy. - If above 0, this value is the maximum value for an impulse that this Joint3D produces. + If above 0, this value is the maximum value for an impulse that this Joint3D produces. It is measured in N·s, or kg·m/s in SI base units. diff --git a/doc/classes/SliderJoint3D.xml b/doc/classes/SliderJoint3D.xml index 893051449296..e7bda1355213 100644 --- a/doc/classes/SliderJoint3D.xml +++ b/doc/classes/SliderJoint3D.xml @@ -27,40 +27,37 @@ - The amount of damping of the rotation when the limit is surpassed. - A lower damping value allows a rotation initiated by body A to travel to body B slower. + The amount of damping of the rotation when the limit is surpassed. A lower damping value allows a rotation initiated by body A to travel to body B slower. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. The lower limit of rotation in the slider. - The amount of restitution of the rotation when the limit is surpassed. - Does not affect damping. + The amount of restitution of the rotation when the limit is surpassed. Does not affect damping. Restitution is a dimensionless value. - A factor applied to the all rotation once the limit is surpassed. - Makes all rotation slower when between 0 and 1. + The stiffness factor applied to the all rotation once the limit is surpassed. Makes all rotation slower when between 0 and 1. Lower values are softer, while higher values are stiffer. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. The upper limit of rotation in the slider. - The amount of damping of the rotation in the limits. + The amount of damping of the rotation in the limits. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. - The amount of restitution of the rotation in the limits. + The amount of restitution of the rotation in the limits. Restitution is a dimensionless value. - A factor applied to the all rotation in the limits. + The stiffness factor applied to the all rotation in the limits. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. - The amount of damping of the rotation across axes orthogonal to the slider. + The amount of damping of the rotation across axes orthogonal to the slider. It is measured in N·m·s/rad, or kg·m²/s/rad in SI base units. - The amount of restitution of the rotation across axes orthogonal to the slider. + The amount of restitution of the rotation across axes orthogonal to the slider. Restitution is a dimensionless value. - A factor applied to the all rotation across axes orthogonal to the slider. + The stiffness factor applied to the all rotation across axes orthogonal to the slider. It is measured in N·m/rad, or kg·m²/s²/rad in SI base units. The amount of damping that happens once the limit defined by [member linear_limit/lower_distance] and [member linear_limit/upper_distance] is surpassed. @@ -69,31 +66,31 @@ The minimum difference between the pivot points on their X axis before damping happens. - The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. + The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. Restitution is a dimensionless value. - A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. + The stiffness factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. It is measured in N/m, or kg/s² in SI base units. The maximum difference between the pivot points on their X axis before damping happens. - The amount of damping inside the slider limits. + The amount of damping inside the slider limits. It is measured in N·s/m, or kg/s in SI base units. - The amount of restitution inside the slider limits. + The amount of restitution inside the slider limits. Restitution is a dimensionless value. - A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. + The stiffness factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. It is measured in N/m, or kg/s² in SI base units. - The amount of damping when movement is across axes orthogonal to the slider. + The amount of damping when movement is across axes orthogonal to the slider. It is measured in N·s/m, or kg/s in SI base units. - The amount of restitution when movement is across axes orthogonal to the slider. + The amount of restitution when movement is across axes orthogonal to the slider. Restitution is a dimensionless value. - A factor applied to the movement across axes orthogonal to the slider. + The stiffness factor applied to the movement across axes orthogonal to the slider. Lower values are softer, while higher values are stiffer. It is measured in N/m, or kg/s² in SI base units. diff --git a/scene/2d/physics/joints/damped_spring_joint_2d.cpp b/scene/2d/physics/joints/damped_spring_joint_2d.cpp index 4b210ec0c74a..1a0ee12e555e 100644 --- a/scene/2d/physics/joints/damped_spring_joint_2d.cpp +++ b/scene/2d/physics/joints/damped_spring_joint_2d.cpp @@ -120,8 +120,8 @@ void DampedSpringJoint2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "1,65535,1,exp,suffix:px"), "set_length", "get_length"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rest_length", PROPERTY_HINT_RANGE, "0,65535,1,exp,suffix:px"), "set_rest_length", "get_rest_length"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "stiffness", PROPERTY_HINT_RANGE, "0.1,64,0.1,exp"), "set_stiffness", "get_stiffness"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0.01,16,0.01,exp"), "set_damping", "get_damping"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "stiffness", PROPERTY_HINT_RANGE, U"0.1,64,0.1,exp,suffix:kg/s\u00B2"), "set_stiffness", "get_stiffness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "damping", PROPERTY_HINT_RANGE, "0.01,16,0.01,exp,suffix:kg/s"), "set_damping", "get_damping"); } DampedSpringJoint2D::DampedSpringJoint2D() { diff --git a/scene/2d/physics/joints/pin_joint_2d.cpp b/scene/2d/physics/joints/pin_joint_2d.cpp index 6ff0c485f575..4d4d70e7855c 100644 --- a/scene/2d/physics/joints/pin_joint_2d.cpp +++ b/scene/2d/physics/joints/pin_joint_2d.cpp @@ -163,7 +163,7 @@ void PinJoint2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_angular_limit_enabled", "enabled"), &PinJoint2D::set_angular_limit_enabled); ClassDB::bind_method(D_METHOD("is_angular_limit_enabled"), &PinJoint2D::is_angular_limit_enabled); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "softness", PROPERTY_HINT_RANGE, "0.00,16,0.01,exp"), "set_softness", "get_softness"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "softness", PROPERTY_HINT_RANGE, U"0.00,16,0.01,exp,suffix:s\u00B2/kg"), "set_softness", "get_softness"); ADD_GROUP("Angular Limit", "angular_limit_"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "angular_limit_enabled"), "set_angular_limit_enabled", "is_angular_limit_enabled"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "angular_limit_lower", PROPERTY_HINT_RANGE, "-180,180,0.1,radians_as_degrees"), "set_angular_limit_lower", "get_angular_limit_lower"); diff --git a/scene/3d/physics/joints/cone_twist_joint_3d.cpp b/scene/3d/physics/joints/cone_twist_joint_3d.cpp index 3da0cbee71df..cc1bb98c072a 100644 --- a/scene/3d/physics/joints/cone_twist_joint_3d.cpp +++ b/scene/3d/physics/joints/cone_twist_joint_3d.cpp @@ -38,8 +38,8 @@ void ConeTwistJoint3D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "twist_span", PROPERTY_HINT_RANGE, "-40000,40000,0.1,radians_as_degrees"), "set_param", "get_param", PARAM_TWIST_SPAN); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "bias", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_BIAS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "relaxation", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_RELAXATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "softness", PROPERTY_HINT_RANGE, U"0.01,16.0,0.01,suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param", "get_param", PARAM_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "relaxation", PROPERTY_HINT_RANGE, U"0.01,16.0,0.01,suffix:rad\u22C5s/kg/m\u00B2 (rad/N/m/s) (inverse damping)"), "set_param", "get_param", PARAM_RELAXATION); BIND_ENUM_CONSTANT(PARAM_SWING_SPAN); BIND_ENUM_CONSTANT(PARAM_TWIST_SPAN); diff --git a/scene/3d/physics/joints/generic_6dof_joint_3d.cpp b/scene/3d/physics/joints/generic_6dof_joint_3d.cpp index 9f440b65cc37..320e6afaf580 100644 --- a/scene/3d/physics/joints/generic_6dof_joint_3d.cpp +++ b/scene/3d/physics/joints/generic_6dof_joint_3d.cpp @@ -54,23 +54,23 @@ void Generic6DOFJoint3D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/upper_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_x", "get_param_x", PARAM_LINEAR_UPPER_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/lower_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_x", "get_param_x", PARAM_LINEAR_LOWER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/softness", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg/s\u00B2 (N/m)"), "set_param_x", "get_param_x", PARAM_LINEAR_LIMIT_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_LINEAR_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_x/damping", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg/s (N\u22C5s/m)"), "set_param_x", "get_param_x", PARAM_LINEAR_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/upper_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_y", "get_param_y", PARAM_LINEAR_UPPER_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/lower_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_y", "get_param_y", PARAM_LINEAR_LOWER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/softness", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg/s\u00B2 (N/m)"), "set_param_y", "get_param_y", PARAM_LINEAR_LIMIT_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_LINEAR_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_y/damping", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg/s (N\u22C5s/m)"), "set_param_y", "get_param_y", PARAM_LINEAR_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_limit_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/upper_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_z", "get_param_z", PARAM_LINEAR_UPPER_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/lower_distance", PROPERTY_HINT_NONE, "suffix:m"), "set_param_z", "get_param_z", PARAM_LINEAR_LOWER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/softness", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg/s\u00B2 (N/m)"), "set_param_z", "get_param_z", PARAM_LINEAR_LIMIT_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_LINEAR_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit_z/damping", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg/s (N\u22C5s/m)"), "set_param_z", "get_param_z", PARAM_LINEAR_DAMPING); ADD_GROUP("Linear Motor", "linear_motor_"); @@ -89,18 +89,18 @@ void Generic6DOFJoint3D::_bind_methods() { ADD_GROUP("Linear Spring", "linear_spring_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_LINEAR_SPRING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/damping"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/stiffness", PROPERTY_HINT_NONE, U"suffix:kg/s\u00B2 (N/m)"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_STIFFNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/damping", PROPERTY_HINT_NONE, U"suffix:kg/s (N\u22C5s/m)"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_x/equilibrium_point", PROPERTY_HINT_NONE, "suffix:m"), "set_param_x", "get_param_x", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_LINEAR_SPRING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/damping"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/stiffness", PROPERTY_HINT_NONE, U"suffix:kg/s\u00B2 (N/m)"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_STIFFNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/damping", PROPERTY_HINT_NONE, U"suffix:kg/s (N\u22C5s/m)"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_y/equilibrium_point", PROPERTY_HINT_NONE, "suffix:m"), "set_param_y", "get_param_y", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "linear_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_LINEAR_SPRING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/damping"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/stiffness", PROPERTY_HINT_NONE, U"suffix:kg/s\u00B2 (N/m)"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_STIFFNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/damping", PROPERTY_HINT_NONE, U"suffix:kg/s (N\u22C5s/m)"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_spring_z/equilibrium_point", PROPERTY_HINT_NONE, "suffix:m"), "set_param_z", "get_param_z", PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT); ADD_GROUP("Angular Limit", "angular_limit_"); @@ -108,27 +108,27 @@ void Generic6DOFJoint3D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_ANGULAR_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01,radians_as_degrees"), "set_param_x", "get_param_x", PARAM_ANGULAR_UPPER_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01,radians_as_degrees"), "set_param_x", "get_param_x", PARAM_ANGULAR_LOWER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/softness", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param_x", "get_param_x", PARAM_ANGULAR_LIMIT_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_x", "get_param_x", PARAM_ANGULAR_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/damping", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg\u22C5m\u00B2/s/rad (N\u22C5m\u22C5s/rad)"), "set_param_x", "get_param_x", PARAM_ANGULAR_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/force_limit", PROPERTY_HINT_NONE, U"suffix:kg\u22C5m\u00B2/s\u00B2 (Nm)"), "set_param_x", "get_param_x", PARAM_ANGULAR_FORCE_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_x/erp"), "set_param_x", "get_param_x", PARAM_ANGULAR_ERP); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_ANGULAR_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01,radians_as_degrees"), "set_param_y", "get_param_y", PARAM_ANGULAR_UPPER_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01,radians_as_degrees"), "set_param_y", "get_param_y", PARAM_ANGULAR_LOWER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/softness", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param_y", "get_param_y", PARAM_ANGULAR_LIMIT_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_y", "get_param_y", PARAM_ANGULAR_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/damping", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg\u22C5m\u00B2/s/rad (N\u22C5m\u22C5s/rad)"), "set_param_y", "get_param_y", PARAM_ANGULAR_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/force_limit", PROPERTY_HINT_NONE, U"suffix:kg\u22C5m\u00B2/s\u00B2 (Nm)"), "set_param_y", "get_param_y", PARAM_ANGULAR_FORCE_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_y/erp"), "set_param_y", "get_param_y", PARAM_ANGULAR_ERP); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_limit_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_ANGULAR_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.01,radians_as_degrees"), "set_param_z", "get_param_z", PARAM_ANGULAR_UPPER_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.01,radians_as_degrees"), "set_param_z", "get_param_z", PARAM_ANGULAR_LOWER_LIMIT); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/softness", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param_z", "get_param_z", PARAM_ANGULAR_LIMIT_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/restitution", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/damping", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param_z", "get_param_z", PARAM_ANGULAR_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/damping", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg\u22C5m\u00B2/s/rad (N\u22C5m\u22C5s/rad)"), "set_param_z", "get_param_z", PARAM_ANGULAR_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/force_limit", PROPERTY_HINT_NONE, U"suffix:kg\u22C5m\u00B2/s\u00B2 (Nm)"), "set_param_z", "get_param_z", PARAM_ANGULAR_FORCE_LIMIT); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit_z/erp"), "set_param_z", "get_param_z", PARAM_ANGULAR_ERP); @@ -149,18 +149,18 @@ void Generic6DOFJoint3D::_bind_methods() { ADD_GROUP("Angular Spring", "angular_spring_"); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_x/enabled"), "set_flag_x", "get_flag_x", FLAG_ENABLE_ANGULAR_SPRING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/stiffness"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/damping"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/stiffness", PROPERTY_HINT_NONE, U"suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_STIFFNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/damping", PROPERTY_HINT_NONE, U"suffix:kg\u22C5m\u00B2/s/rad (N\u22C5m\u22C5s/rad)"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_x/equilibrium_point", PROPERTY_HINT_RANGE, "-180,180,0.01,radians_as_degrees"), "set_param_x", "get_param_x", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_y/enabled"), "set_flag_y", "get_flag_y", FLAG_ENABLE_ANGULAR_SPRING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/stiffness"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/damping"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/stiffness", PROPERTY_HINT_NONE, U"suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_STIFFNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/damping", PROPERTY_HINT_NONE, U"suffix:kg\u22C5m\u00B2/s/rad (N\u22C5m\u22C5s/rad)"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_y/equilibrium_point", PROPERTY_HINT_RANGE, "-180,180,0.01,radians_as_degrees"), "set_param_y", "get_param_y", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "angular_spring_z/enabled"), "set_flag_z", "get_flag_z", FLAG_ENABLE_ANGULAR_SPRING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/stiffness"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_STIFFNESS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/damping"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/stiffness", PROPERTY_HINT_NONE, U"suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_STIFFNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/damping", PROPERTY_HINT_NONE, U"suffix:kg\u22C5m\u00B2/s/rad (N\u22C5m\u22C5s/rad)"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_spring_z/equilibrium_point", PROPERTY_HINT_RANGE, "-180,180,0.01,radians_as_degrees"), "set_param_z", "get_param_z", PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT); BIND_ENUM_CONSTANT(PARAM_LINEAR_LOWER_LIMIT); diff --git a/scene/3d/physics/joints/hinge_joint_3d.cpp b/scene/3d/physics/joints/hinge_joint_3d.cpp index 92472a45e4d2..9b103f9845b0 100644 --- a/scene/3d/physics/joints/hinge_joint_3d.cpp +++ b/scene/3d/physics/joints/hinge_joint_3d.cpp @@ -43,8 +43,8 @@ void HingeJoint3D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/upper", PROPERTY_HINT_RANGE, "-180,180,0.1,radians_as_degrees"), "set_param", "get_param", PARAM_LIMIT_UPPER); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/lower", PROPERTY_HINT_RANGE, "-180,180,0.1,radians_as_degrees"), "set_param", "get_param", PARAM_LIMIT_LOWER); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_LIMIT_BIAS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_SOFTNESS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/relaxation", PROPERTY_HINT_RANGE, "0.01,16,0.01"), "set_param", "get_param", PARAM_LIMIT_RELAXATION); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/softness", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param", "get_param", PARAM_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/relaxation", PROPERTY_HINT_RANGE, U"0.01,16,0.01,suffix:rad\u22C5s/kg/m\u00B2 (rad/N/m/s) (inverse damping)"), "set_param", "get_param", PARAM_LIMIT_RELAXATION); ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "motor/enable"), "set_flag", "get_flag", FLAG_ENABLE_MOTOR); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "motor/target_velocity", PROPERTY_HINT_RANGE, U"-200,200,0.01,or_greater,or_less,radians_as_degrees,suffix:\u00B0/s"), "set_param", "get_param", PARAM_MOTOR_TARGET_VELOCITY); diff --git a/scene/3d/physics/joints/pin_joint_3d.cpp b/scene/3d/physics/joints/pin_joint_3d.cpp index 8e367c5ef6e8..5b0130769525 100644 --- a/scene/3d/physics/joints/pin_joint_3d.cpp +++ b/scene/3d/physics/joints/pin_joint_3d.cpp @@ -35,8 +35,8 @@ void PinJoint3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_param", "param"), &PinJoint3D::get_param); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/bias", PROPERTY_HINT_RANGE, "0.01,0.99,0.01"), "set_param", "get_param", PARAM_BIAS); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/damping", PROPERTY_HINT_RANGE, "0.01,8.0,0.01"), "set_param", "get_param", PARAM_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/impulse_clamp", PROPERTY_HINT_RANGE, "0.0,64.0,0.01"), "set_param", "get_param", PARAM_IMPULSE_CLAMP); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/damping", PROPERTY_HINT_RANGE, U"0.01,8.0,0.01,suffix:kg\u22C5m\u00B2/s/rad (N\u22C5s/m)"), "set_param", "get_param", PARAM_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "params/impulse_clamp", PROPERTY_HINT_RANGE, U"0.0,64.0,0.01,suffix:kg\u22C5m\u00B2/s/rad (N\u22C5s)"), "set_param", "get_param", PARAM_IMPULSE_CLAMP); BIND_ENUM_CONSTANT(PARAM_BIAS); BIND_ENUM_CONSTANT(PARAM_DAMPING); diff --git a/scene/3d/physics/joints/slider_joint_3d.cpp b/scene/3d/physics/joints/slider_joint_3d.cpp index df6b1cc04563..8efd7dc5302d 100644 --- a/scene/3d/physics/joints/slider_joint_3d.cpp +++ b/scene/3d/physics/joints/slider_joint_3d.cpp @@ -36,27 +36,27 @@ void SliderJoint3D::_bind_methods() { ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/upper_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01,suffix:m"), "set_param", "get_param", PARAM_LINEAR_LIMIT_UPPER); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/lower_distance", PROPERTY_HINT_RANGE, "-1024,1024,0.01,suffix:m"), "set_param", "get_param", PARAM_LINEAR_LIMIT_LOWER); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/softness", PROPERTY_HINT_RANGE, U"0.01,16.0,0.01,suffix:kg/s\u00B2 (N/m)"), "set_param", "get_param", PARAM_LINEAR_LIMIT_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_LIMIT_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_limit/damping", PROPERTY_HINT_RANGE, U"0,16.0,0.01,suffix:kg/s (N\u22C5s/m)"), "set_param", "get_param", PARAM_LINEAR_LIMIT_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/softness", PROPERTY_HINT_RANGE, U"0.01,16.0,0.01,suffix:kg/s\u00B2 (N/m)"), "set_param", "get_param", PARAM_LINEAR_MOTION_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_MOTION_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_motion/damping", PROPERTY_HINT_RANGE, U"0,16.0,0.01,suffix:kg/s (N\u22C5s/m)"), "set_param", "get_param", PARAM_LINEAR_MOTION_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/softness", PROPERTY_HINT_RANGE, U"0.01,16.0,0.01,suffix:kg/s\u00B2 (N/m)"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "linear_ortho/damping", PROPERTY_HINT_RANGE, U"0,16.0,0.01,suffix:kg/s (N\u22C5s/m)"), "set_param", "get_param", PARAM_LINEAR_ORTHOGONAL_DAMPING); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/upper_angle", PROPERTY_HINT_RANGE, "-180,180,0.1,radians_as_degrees"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_UPPER); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/lower_angle", PROPERTY_HINT_RANGE, "-180,180,0.1,radians_as_degrees"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_LOWER); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/softness", PROPERTY_HINT_RANGE, U"0.01,16.0,0.01,suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_limit/damping", PROPERTY_HINT_RANGE, U"0,16.0,0.01,suffix:kg\u22C5m\u00B2/s/rad (N\u22C5m\u22C5s/rad)"), "set_param", "get_param", PARAM_ANGULAR_LIMIT_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/softness", PROPERTY_HINT_RANGE, U"0.01,16.0,0.01,suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param", "get_param", PARAM_ANGULAR_MOTION_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_MOTION_DAMPING); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/softness", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_SOFTNESS); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_motion/damping", PROPERTY_HINT_RANGE, U"0,16.0,0.01,suffix:kg\u22C5m\u00B2/s/rad (N\u22C5m\u22C5s/rad)"), "set_param", "get_param", PARAM_ANGULAR_MOTION_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/softness", PROPERTY_HINT_RANGE, U"0.01,16.0,0.01,suffix:kg\u22C5m\u00B2/s\u00B2/rad (N\u22C5m/rad)"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_SOFTNESS); ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/restitution", PROPERTY_HINT_RANGE, "0.01,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_RESTITUTION); - ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/damping", PROPERTY_HINT_RANGE, "0,16.0,0.01"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_DAMPING); + ADD_PROPERTYI(PropertyInfo(Variant::FLOAT, "angular_ortho/damping", PROPERTY_HINT_RANGE, U"0,16.0,0.01,suffix:kg\u22C5m\u00B2/s/rad (N\u22C5m\u22C5s/rad)"), "set_param", "get_param", PARAM_ANGULAR_ORTHOGONAL_DAMPING); BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_UPPER); BIND_ENUM_CONSTANT(PARAM_LINEAR_LIMIT_LOWER);