diff --git a/doc/classes/ConeTwistJoint.xml b/doc/classes/ConeTwistJoint.xml index 67c7cc4cfee..78655c496d4 100644 --- a/doc/classes/ConeTwistJoint.xml +++ b/doc/classes/ConeTwistJoint.xml @@ -1,8 +1,12 @@ + A twist joint between two 3D bodies + The joint can rotate the bodies across an axis defined by the local x-axes of the [Joint]. + The twist axis is initiated as the x-axis of the [Joint]. + Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint in the local space of the two Bodies. @@ -30,28 +34,49 @@ + The speed with which the swing or twist will take place. + The higher, the faster. + Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. + Swing is rotation from side to side, around the axis perpendicular to the twist axis. + The swing span defines, how much rotation will not get corrected allong the swing axis. + Could be defined as looseness in the [ConeTwistJoint]. + If below 0.05, this behaviour is locked. Default value: [code]PI/4[/code]. + Twist is the rotation around the twist axis, this value defined how far the joint can twist. + Twist is locked if below 0.05. + Swing is rotation from side to side, around the axis perpendicular to the twist axis. + The swing span defines, how much rotation will not get corrected allong the swing axis. + Could be defined as looseness in the [ConeTwistJoint]. + If below 0.05, this behaviour is locked. Default value: [code]PI/4[/code]. + Twist is the rotation around the twist axis, this value defined how far the joint can twist. + Twist is locked if below 0.05. + The speed with which the swing or twist will take place. + The higher, the faster. + The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. + Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + End flag of PARAM_* constants, used internally. diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml index 4b782e994af..89ec1fd8362 100644 --- a/doc/classes/Generic6DOFJoint.xml +++ b/doc/classes/Generic6DOFJoint.xml @@ -1,8 +1,10 @@ + The generic 6 degrees of freedom joint can implement a variety of joint-types by locking certain axes' rotation or translation. + The first 3 dof axes are linear axes, which represent translation of Bodies, and the latter 3 dof axes represent the angular motion. Each axis can be either locked, or limited. @@ -120,146 +122,217 @@ + 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. + If [code]true[/code] rotation across the x-axis is enabled. + When rotating across 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 arround x-axis. + The minimum rotation in negative direction to break loose and rotate arround the x-axis. + The amount of rotational restitution across the x-axis. The lower, the more restitution occurs. + The speed of all rotations across the x-axis. + The minimum rotation in positive direction to break loose and rotate arround the x-axis. + The amount of rotational damping across the y-axis. The lower, the more dampening occurs. + If [code]true[/code] rotation across the y-axis is enabled. + When rotating across 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 arround y-axis. + The minimum rotation in negative direction to break loose and rotate arround the y-axis. + The amount of rotational restitution across the y-axis. The lower, the more restitution occurs. + The speed of all rotations across the y-axis. + The minimum rotation in positive direction to break loose and rotate arround the y-axis. + The amount of rotational damping across the z-axis. The lower, the more dampening occurs. + If [code]true[/code] rotation across the z-axis is enabled. + When rotating across 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 arround z-axis. + The minimum rotation in negative direction to break loose and rotate arround the z-axis. + The amount of rotational restitution across the z-axis. The lower, the more restitution occurs. + The speed of all rotations across the z-axis. + The minimum rotation in positive direction to break loose and rotate arround the z-axis. + If [code]true[/code] a rotating motor at the x-axis is enabled. + Maximum acceleration for the motor at the x-axis. + Target speed for the motor at the x-axis. + If [code]true[/code] a rotating motor at the y-axis is enabled. + Maximum acceleration for the motor at the y-axis. + Target speed for the motor at the y-axis. + If [code]true[/code] a rotating motor at the z-axis is enabled. + Maximum acceleration for the motor at the z-axis. + Target speed for the motor at the z-axis. + The amount of damping that happens at the x-motion. + If [code]true[/code] the linear motion across the x-axis is enabled. + The minimum difference between the pivot points' x-axis. + The amount of restitution on the x-axis movement The lower, the more momentum gets lost. + A factor applied to the movement across the x-axis The lower, the slower the movement. + The maximum difference between the pivot points' x-axis. + The amount of damping that happens at the y-motion. + If [code]true[/code] the linear motion across the y-axis is enabled. + The minimum difference between the pivot points' y-axis. + The amount of restitution on the y-axis movement The lower, the more momentum gets lost. + A factor applied to the movement across the y-axis The lower, the slower the movement. + The maximum difference between the pivot points' y-axis. + The amount of damping that happens at the z-motion. + If [code]true[/code] the linear motion across the z-axis is enabled. + The minimum difference between the pivot points' z-axis. + The amount of restitution on the z-axis movement The lower, the more momentum gets lost. + A factor applied to the movement across the z-axis The lower, the slower the movement. + The maximum difference between the pivot points' z-axis. + The minimum difference between the pivot points' axes. + The maximum difference between the pivot points' axes. + A factor applied to the movement across the axes The lower, the slower the movement. + The amount of restitution on the axes movement The lower, the more momentum gets lost. + The amount of damping that happens at the linear motion across the axes. + The minimum rotation in negative direction to break loose and rotate arround the axes. + The minimum rotation in positive direction to break loose and rotate arround the axes. + The speed of all rotations across the axes. + The amount of rotational damping across the axes. The lower, the more dampening occurs. + The amount of rotational restitution across the axes. The lower, the more restitution occurs. + The maximum amount of force that can occur, when rotating arround the axes. + 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. + Maximum acceleration for the motor at the axes. + End flag of PARAM_* constants, used internally. + If [code]set[/code] there is linear motion possible within the given limits. + If [code]set[/code] there is rotational motion possible. + If [code]set[/code] there is a rotational motor across these axes. + End flag of FLAG_* constants, used internally. diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml index ae3693c3a4a..d18e63f8a36 100644 --- a/doc/classes/HingeJoint.xml +++ b/doc/classes/HingeJoint.xml @@ -1,8 +1,10 @@ + A hinge between two 3D bodies. + Normaly uses the z-axis of body A as the hinge axis, another axis can be specified when adding it manually though. @@ -48,50 +50,70 @@ + The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + If [code]true[/code] the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. + 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 maximum rotation. only active if [member angular_limit/enable] is [code]true[/code]. + When activated, a motor turns the hinge. + Maximum acceleration for the motor. + Target speed for the motor. + The speed with wich the two bodies get pulled together when they move in different directions. + The speed with wich the two bodies get pulled together when they move in different directions. + The maximum rotation. only active if [member angular_limit/enable] is [code]true[/code]. + The minimum rotation. only active if [member angular_limit/enable] is [code]true[/code]. + The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + The lower this value, the more the rotation gets slowed down. + Target speed for the motor. + Maximum acceleration for the motor. + End flag of PARAM_* constants, used internally. + If [code]true[/code] the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. + When activated, a motor turns the hinge. + End flag of FLAG_* constants, used internally. diff --git a/doc/classes/Joint.xml b/doc/classes/Joint.xml index 2e7d24aac17..901f84fe5e0 100644 --- a/doc/classes/Joint.xml +++ b/doc/classes/Joint.xml @@ -1,8 +1,10 @@ + Base class for all 3D joints + All 3D joints link two nodes, has a priority, and can decide if the two bodies of the nodes should be able to collide with each other @@ -68,12 +70,16 @@ + If [code]true[/code] the two bodies of the nodes are not able to collide with each other. + The [Node], the first side of the Joint attaches to. + The [Node], the second side of the Joint attaches to. + The order in wich the solver is executed compared to the other [Joints], the lower, the earlier. diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index 37e15678912..edc46a53d03 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -21,7 +21,7 @@ - Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. @@ -32,7 +32,7 @@ - Assign the area to a descendant of [Object], so it can exist in the node tree. + Assigns the area to a descendant of [Object], so it can exist in the node tree. @@ -41,14 +41,14 @@ - Remove all shapes from an area. It does not delete the shapes, so they can be reassigned later. + Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. - Create an [Area2D]. + Creates an [Area2D]. @@ -57,7 +57,7 @@ - Get the instance ID of the object the area is assigned to. + Gets the instance ID of the object the area is assigned to. @@ -68,7 +68,7 @@ - Return an area parameter value. + Returns an area parameter value. A list of available parameters is on the AREA_PARAM_* constants. @@ -79,7 +79,7 @@ - Return the [RID] of the nth shape of an area. + Returns the [RID] of the nth shape of an area. @@ -88,7 +88,7 @@ - Return the number of shapes assigned to an area. + Returns the number of shapes assigned to an area. @@ -99,7 +99,7 @@ - Return the transform matrix of a shape within an area. + Returns the transform matrix of a shape within an area. @@ -108,7 +108,7 @@ - Return the space assigned to the area. + Returns the space assigned to the area. @@ -117,7 +117,7 @@ - Return the space override mode for the area. + Returns the space override mode for the area. @@ -126,7 +126,7 @@ - Return the transform matrix for an area. + Returns the transform matrix for an area. @@ -137,7 +137,7 @@ - Remove a shape from an area. It does not delete the shape, so it can be reassigned later. + Removes a shape from an area. It does not delete the shape, so it can be reassigned later. @@ -148,7 +148,7 @@ - Assign the area to one or many physics layers. + Assigns the area to one or many physics layers. @@ -159,7 +159,7 @@ - Set which physics layers the area will monitor. + Sets which physics layers the area will monitor. @@ -172,7 +172,7 @@ - Set the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: + Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. 2: [RID] of the object that entered/exited the area. 3: Instance ID of the object that entered/exited the area. @@ -190,7 +190,7 @@ - Set the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants. + Sets the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants. @@ -203,7 +203,7 @@ - Substitute a given area shape by another. The old shape is selected by its index, the new one by its [RID]. + Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]. @@ -216,6 +216,7 @@ + Disables a given shape in this area if [code]disable is true[/code] @@ -228,7 +229,7 @@ - Set the transform matrix for an area shape. + Sets the transform matrix for an area shape. @@ -239,7 +240,7 @@ - Assign a space to the area. + Assigns a space to the area. @@ -250,7 +251,7 @@ - Set the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*. + Sets the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*. @@ -261,7 +262,7 @@ - Set the transform matrix for an area. + Sets the transform matrix for an area. @@ -272,7 +273,7 @@ - Add a body to the list of bodies exempt from collisions. + Adds a body to the list of bodies exempt from collisions. @@ -285,7 +286,7 @@ - Add a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. + Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. @@ -298,7 +299,7 @@ - Add a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. + Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. @@ -311,7 +312,7 @@ - Add a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. + Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. @@ -322,7 +323,7 @@ - Assign the area to a descendant of [Object], so it can exist in the node tree. + Assigns the area to a descendant of [Object], so it can exist in the node tree. @@ -331,7 +332,7 @@ - Remove all shapes from a body. + Removes all shapes from a body. @@ -342,7 +343,7 @@ - Create a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. + Creates a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. @@ -351,7 +352,7 @@ - Return the physics layer or layers a body belongs to. + Returns the physics layer or layers a body belongs to. @@ -360,7 +361,7 @@ - Return the physics layer or layers a body can collide with. + Returns the physics layer or layers a body can collide with. @@ -369,7 +370,7 @@ - Return the continuous collision detection mode. + Returns the continuous collision detection mode. @@ -378,6 +379,7 @@ + Returns the [Physics2DDirectBodyState] of the body. @@ -386,7 +388,7 @@ - Return the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. + Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. @@ -395,7 +397,7 @@ - Return the body mode. + Returns the body mode. @@ -404,7 +406,7 @@ - Get the instance ID of the object the area is assigned to. + Gets the instance ID of the object the area is assigned to. @@ -415,7 +417,7 @@ - Return the value of a body parameter. + Returns the value of a body parameter. A list of available parameters is on the BODY_PARAM_* constants. @@ -426,7 +428,7 @@ - Return the [RID] of the nth shape of a body. + Returns the [RID] of the nth shape of a body. @@ -435,7 +437,7 @@ - Return the number of shapes assigned to a body. + Returns the number of shapes assigned to a body. @@ -446,7 +448,7 @@ - Return the metadata of a shape of a body. + Returns the metadata of a shape of a body. @@ -457,7 +459,7 @@ - Return the transform matrix of a body shape. + Returns the transform matrix of a body shape. @@ -466,7 +468,7 @@ - Return the [RID] of the space assigned to a body. + Returns the [RID] of the space assigned to a body. @@ -477,7 +479,7 @@ - Return a body state. + Returns a body state. @@ -486,7 +488,7 @@ - Return whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). + Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). @@ -497,7 +499,7 @@ - Remove a body from the list of bodies exempt from collisions. + Removes a body from the list of bodies exempt from collisions. @@ -508,7 +510,7 @@ - Remove a shape from a body. The shape is not deleted, so it can be reused afterwards. + Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. @@ -519,7 +521,7 @@ - Set an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. + Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. @@ -530,7 +532,7 @@ - Set the physics layer or layers a body belongs to. + Sets the physics layer or layers a body belongs to. @@ -541,7 +543,7 @@ - Set the physics layer or layers a body can collide with. + Sets the physics layer or layers a body can collide with. @@ -552,7 +554,7 @@ - Set the continuous collision detection mode from any of the CCD_MODE_* constants. + Sets the continuous collision detection mode from any of the CCD_MODE_* constants. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. @@ -568,7 +570,7 @@ - Set the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force integration]). + Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force integration]). @@ -579,7 +581,7 @@ - Set the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. + Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. @@ -590,7 +592,7 @@ - Set the body mode, from one of the constants BODY_MODE*. + Sets the body mode, from one of the constants BODY_MODE*. @@ -601,7 +603,7 @@ - Set whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). + Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). @@ -614,7 +616,7 @@ - Set a body parameter (see BODY_PARAM* constants). + Sets a body parameter. A list of available parameters is on the BODY_PARAM_* constants. @@ -627,7 +629,7 @@ - Substitute a given body shape by another. The old shape is selected by its index, the new one by its [RID]. + Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]. @@ -640,6 +642,7 @@ + Enables one way collision on body if [code]enable is true[/code]. @@ -652,6 +655,7 @@ + Disables shape in body if [code]disable is true[/code]. @@ -664,7 +668,7 @@ - Set metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries. + Sets metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries. @@ -677,7 +681,7 @@ - Set the transform matrix for a body shape. + Sets the transform matrix for a body shape. @@ -688,7 +692,7 @@ - Assign a space to the body (see [method create_space]). + Assigns a space to the body (see [method create_space]). @@ -701,7 +705,7 @@ - Set a body state (see BODY_STATE* constants). + Sets a body state (see BODY_STATE* constants). @@ -718,7 +722,7 @@ - Return whether a body can move from a given point in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in. + Returns whether a body can move from a given point in a given direction. Apart from the boolean return value, a [Physics2DTestMotionResult] can be passed to return additional information in. @@ -733,7 +737,7 @@ - Create a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself. + Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself. @@ -744,7 +748,7 @@ - Return the value of a damped spring joint parameter. + Returns the value of a damped spring joint parameter. @@ -757,7 +761,7 @@ - Set a damped spring joint parameter. Parameters are explained in the DAMPED_STRING* constants. + Sets a damped spring joint parameter. Parameters are explained in the DAMPED_STRING* constants. @@ -766,7 +770,7 @@ - Destroy any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console. + Destroys any of the objects created by Physics2DServer. If the [RID] passed is not one of the objects that can be created by Physics2DServer, an error will be sent to the console. @@ -775,7 +779,7 @@ - Return information about the current state of the 2D physics engine. The states are listed under the INFO_* constants. + Returns information about the current state of the 2D physics engine. The states are listed under the INFO_* constants. @@ -792,7 +796,7 @@ - Create a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself. + Creates a groove joint between two bodies. If not specified, the bodyies are assumed to be the joint itself. @@ -803,7 +807,7 @@ - Return the value of a joint parameter. + Returns the value of a joint parameter. @@ -812,7 +816,7 @@ - Return the type of a joint (see JOINT_* constants). + Returns the type of a joint (see JOINT_* constants). @@ -825,7 +829,7 @@ - Set a joint parameter. Parameters are explained in the JOINT_PARAM* constants. + Sets a joint parameter. Parameters are explained in the JOINT_PARAM* constants. @@ -838,7 +842,7 @@ - Create a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself. + Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself. @@ -847,7 +851,7 @@ - Activate or deactivate the 2D physics engine. + Activates or deactivates the 2D physics engine. @@ -856,7 +860,7 @@ - Create a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. + Creates a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. @@ -865,7 +869,7 @@ - Return the shape data. + Returns the shape data. @@ -874,7 +878,7 @@ - Return the type of shape (see SHAPE_* constants). + Returns the type of shape (see SHAPE_* constants). @@ -885,14 +889,14 @@ - Set the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. + Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. - Create a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. + Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. @@ -901,7 +905,7 @@ - Return the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries. + Returns the state of a space, a [Physics2DDirectSpaceState]. This object can be used to make collision/intersection queries. @@ -912,7 +916,7 @@ - Return the value of a space parameter. + Returns the value of a space parameter. @@ -921,7 +925,7 @@ - Return whether the space is active. + Returns whether the space is active. @@ -932,7 +936,7 @@ - Mark a space as active. It will not have an effect, unless it is assigned to an area or body. + Marks a space as active. It will not have an effect, unless it is assigned to an area or body. @@ -945,7 +949,7 @@ - Set the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants. + Sets the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants. @@ -960,8 +964,10 @@ Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. + Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. @@ -985,7 +991,7 @@ This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. - This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the method [method CollisionPolygon2D.set_polygon], polygons modified with [method shape_set_data] do not verify that the points supplied form, in fact, a convex polygon. + This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the method [method CollisionPolygon2D.set_polygon], polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon. This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. diff --git a/doc/classes/Physics2DServerSW.xml b/doc/classes/Physics2DServerSW.xml index a8645c0b968..67fd7a21d86 100644 --- a/doc/classes/Physics2DServerSW.xml +++ b/doc/classes/Physics2DServerSW.xml @@ -4,7 +4,7 @@ Software implementation of [Physics2DServer]. - Software implementation of [Physics2DServer]. This class exposes no new methods or properties and should not be used, as [Physics2DServer] automatically selects the best implementation available. + This class exposes no new methods or properties and should not be used, as [Physics2DServer] automatically selects the best implementation available. diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index e6c81825ade..12c1abccc60 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -1,8 +1,10 @@ + Server interface for low level physics access. + Everything related to physics in 3D. @@ -19,6 +21,7 @@ + Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. @@ -29,6 +32,7 @@ + Assigns the area to a descendant of [Object], so it can exist in the node tree. @@ -37,12 +41,14 @@ + Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. + Creates an [Area]. @@ -51,6 +57,7 @@ + Gets the instance ID of the object the area is assigned to. @@ -61,6 +68,7 @@ + Returns an area parameter value. A list of available parameters is on the AREA_PARAM_* constants. @@ -71,6 +79,7 @@ + Returns the [RID] of the nth shape of an area. @@ -79,6 +88,7 @@ + Returns the number of shapes assigned to an area. @@ -89,6 +99,7 @@ + Returns the transform matrix of a shape within an area. @@ -97,6 +108,7 @@ + Returns the space assigned to the area. @@ -105,6 +117,7 @@ + Returns the space override mode for the area. @@ -113,6 +126,7 @@ + Returns the transform matrix for an area. @@ -121,6 +135,7 @@ + If [code]true[/code] area collides with rays. @@ -131,6 +146,7 @@ + Removes a shape from an area. It does not delete the shape, so it can be reassigned later. @@ -141,6 +157,7 @@ + Assigns the area to one or many physics layers. @@ -151,6 +168,7 @@ + Sets which physics layers the area will monitor. @@ -163,6 +181,12 @@ + Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: + 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. + 2: [RID] of the object that entered/exited the area. + 3: Instance ID of the object that entered/exited the area. + 4: The shape index of the object that entered/exited the area. + 5: The shape index of the area where the object entered/exited. @@ -175,6 +199,7 @@ + Sets the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants. @@ -185,6 +210,7 @@ + Sets object pickable with rays. @@ -197,6 +223,7 @@ + Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]. @@ -209,6 +236,7 @@ + Sets the transform matrix for an area shape. @@ -219,6 +247,7 @@ + Assigns a space to the area. @@ -229,6 +258,7 @@ + Sets the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*. @@ -239,6 +269,7 @@ + Sets the transform matrix for an area. @@ -249,6 +280,7 @@ + Adds a body to the list of bodies exempt from collisions. @@ -261,6 +293,7 @@ + Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. @@ -273,6 +306,7 @@ + Gives the body a push at a [code]position[/code] in the direction of the [code]impulse[/code]. @@ -283,6 +317,7 @@ + Gives the body a push to rotate it. @@ -293,6 +328,7 @@ + Assigns the area to a descendant of [Object], so it can exist in the node tree. @@ -301,6 +337,7 @@ + Removes all shapes from a body. @@ -311,6 +348,7 @@ + Creates a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. @@ -319,6 +357,7 @@ + Gets the information, which Axis is locked if any. The can be any calue from the constants BODY_AXIS_LOCK* @@ -327,6 +366,7 @@ + Returns the physics layer or layers a body belongs to. @@ -335,14 +375,16 @@ - - - - - - - - + Returns the physics layer or layers a body can collide with. +- +- +- +- +- +- +- +- + Returns the [PhysicsDirectBodyState] of the body. @@ -351,6 +393,7 @@ + Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. @@ -359,6 +402,7 @@ + Returns the body mode. @@ -367,6 +411,7 @@ + Gets the instance ID of the object the area is assigned to. @@ -377,6 +422,7 @@ + Returns the value of a body parameter. A list of available parameters is on the BODY_PARAM_* constants. @@ -387,6 +433,7 @@ + Returns the [RID] of the nth shape of a body. @@ -395,6 +442,7 @@ + Returns the number of shapes assigned to a body. @@ -405,6 +453,7 @@ + Returns the transform matrix of a body shape. @@ -413,6 +462,7 @@ + Returns the [RID] of the space assigned to a body. @@ -423,6 +473,7 @@ + Returns a body state. @@ -431,6 +482,7 @@ + If [code]true[/code] the continuous collision detection mode is enabled. @@ -439,6 +491,7 @@ + Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). @@ -447,6 +500,7 @@ + If [code]true[/code] the body can be detected by rays @@ -457,6 +511,8 @@ + Removes a body from the list of bodies exempt from collisions. + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. @@ -467,6 +523,7 @@ + Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. @@ -477,6 +534,7 @@ + Locks velocity along one axis to 0 and only allows rotation along this axis, can also be set to disabled which disables this functionality. @@ -487,6 +545,7 @@ + Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. @@ -497,6 +556,7 @@ + Sets the physics layer or layers a body belongs to. @@ -507,6 +567,7 @@ + Sets the physics layer or layers a body can collide with. @@ -517,6 +578,8 @@ + If [code]true[/code] the continuous collision detection mode is enabled. + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. @@ -531,6 +594,7 @@ + Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force integration]). @@ -541,6 +605,7 @@ + Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. @@ -551,6 +616,7 @@ + Sets the body mode, from one of the constants BODY_MODE*. @@ -561,6 +627,7 @@ + Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). @@ -573,6 +640,7 @@ + Sets a body parameter. A list of available parameters is on the BODY_PARAM_* constants. @@ -583,6 +651,7 @@ + Sets the body pickable with rays if [code]enabled[/code] is set. @@ -595,6 +664,7 @@ + Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]. @@ -607,6 +677,7 @@ + Sets the transform matrix for a body shape. @@ -617,6 +688,7 @@ + Assigns a space to the body (see [method create_space]). @@ -629,6 +701,7 @@ + Sets a body state (see BODY_STATE* constants). @@ -639,6 +712,7 @@ + Gets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants). @@ -651,6 +725,7 @@ + Sets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants). @@ -659,6 +734,7 @@ + Destroys any of the objects created by PhysicsServer. If the [RID] passed is not one of the objects that can be created by PhysicsServer, an error will be sent to the console. @@ -670,7 +746,8 @@ - + + Gets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants). @@ -683,6 +760,7 @@ + Gets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*). @@ -697,6 +775,7 @@ + Sets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants). @@ -711,6 +790,7 @@ + Sets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*). @@ -719,6 +799,7 @@ + Returns an Info defined by the [ProcessInfo] input given. @@ -729,6 +810,7 @@ + Gets a hinge_joint flag (see HINGE_JOINT_FLAG* constants). @@ -739,6 +821,7 @@ + Gets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*). @@ -751,6 +834,7 @@ + Sets a hinge_joint flag (see HINGE_JOINT_FLAG* constants). @@ -763,6 +847,7 @@ + Sets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*). @@ -777,6 +862,7 @@ + Creates a [ConeTwistJoint]. @@ -791,6 +877,7 @@ + Creates a [Generic6DOFJoint]. @@ -805,6 +892,7 @@ + Creates a [HingeJoint]. @@ -819,6 +907,7 @@ + Creates a [PinJoint]. @@ -833,6 +922,7 @@ + Creates a [SliderJoint]. @@ -841,6 +931,7 @@ + Gets the priority value of the Joint. @@ -849,6 +940,7 @@ + Returns the type of the Joint. @@ -859,6 +951,7 @@ + Sets the priority value of the Joint. @@ -867,6 +960,7 @@ + Returns position of the joint in the local space of body a of the joint. @@ -875,6 +969,7 @@ + Returns position of the joint in the local space of body b of the joint. @@ -885,6 +980,7 @@ + Gets a pin_joint parameter (see PIN_JOINT* constants). @@ -895,6 +991,7 @@ + Sets position of the joint in the local space of body a of the joint. @@ -905,6 +1002,7 @@ + Sets position of the joint in the local space of body b of the joint. @@ -917,6 +1015,7 @@ + Sets a pin_joint parameter (see PIN_JOINT* constants). @@ -925,6 +1024,7 @@ + Activates or deactivates the 3D physics engine. @@ -933,6 +1033,7 @@ + Creates a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. @@ -941,6 +1042,7 @@ + Returns the shape data. @@ -949,6 +1051,7 @@ + Returns the type of shape (see SHAPE_* constants). @@ -959,6 +1062,7 @@ + Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. @@ -969,6 +1073,7 @@ + Gets a slider_joint parameter (see SLIDER_JOINT* constants). @@ -981,12 +1086,14 @@ + Gets a slider_joint parameter (see SLIDER_JOINT* constants). + Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. @@ -995,6 +1102,7 @@ + Returns the state of a space, a [PhysicsDirectSpaceState]. This object can be used to make collision/intersection queries. @@ -1005,6 +1113,7 @@ + Returns the value of a space parameter. @@ -1013,6 +1122,7 @@ + Returns whether the space is active. @@ -1023,6 +1133,7 @@ + Marks a space as active. It will not have an effect, unless it is assigned to an area or body. @@ -1035,169 +1146,256 @@ + Sets the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants. + The [Joint] is a [PinJoint]. + The [Joint] is a [HingeJoint]. + The [Joint] is a [SliderJoint]. + The [Joint] is a [ConeTwistJoint]. + The [Joint] is a [Generic6DOFJoint]. + The strength with which the pinned objects try to stay in positional relation to each other. + The higher, the stronger. + The strength with which the pinned objects try to stay in velocity relation to each other. + The higher, the stronger. + If above 0, this value is the maximum value for an impulse that this Joint puts on it's ends. + The speed with wich the two bodies get pulled together when they move in different directions. + The maximum rotation across the Hinge. + The minimum rotation across the Hinge. + The speed with which the rotation across the axis perpendicular to the hinge gets corrected. + The lower this value, the more the rotation gets slowed down. + Target speed for the motor. + Maximum acceleration for the motor. + If [code]true[/code] the Hinge has a maximum and a minimum rotation. + If [code]true[/code] a motor turns the Hinge + The maximum difference between the pivot points on their x-axis before damping happens. + The minimum difference between the pivot points on their x-axis before damping happens. + A factor applied to the movement accross the slider axis once the limits get surpassed. The lower, the slower the movement. + The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. + The amount of damping once the slider limits are surpassed. + A factor applied to the movement accross the slider axis as long as the slider is in the limits. The lower, the slower the movement. + The amount of restitution inside the slider limits. + The amount of damping inside the slider limits. + A factor applied to the movement accross axes orthogonal to the slider. + The amount of restitution when movement is accross axes orthogonal to the slider. + The amount of damping when movement is accross axes orthogonal to the slider. + The upper limit of rotation in the slider. + The lower limit of rotation in the slider. + A factor applied to the all rotation once the limit is surpassed. + The amount of restitution of the rotation when the limit is surpassed. + The amount of damping of the rotation when the limit is surpassed. + A factor that gets applied to the all rotation in the limits. + The amount of restitution of the rotation in the limits. + The amount of damping of the rotation in the limits. + A factor that gets applied to the all rotation across axes orthogonal to the slider. + The amount of restitution of the rotation across axes orthogonal to the slider. + The amount of damping of the rotation across axes orthogonal to the slider. + End flag of SLIDER_JOINT_* constants, used internally. + Swing is rotation from side to side, around the axis perpendicular to the twist axis. + The swing span defines, how much rotation will not get corrected allong the swing axis. + Could be defined as looseness in the [ConeTwistJoint]. + If below 0.05, this behaviour is locked. Default value: [code]PI/4[/code]. + Twist is the rotation around the twist axis, this value defined how far the joint can twist. + Twist is locked if below 0.05. + The speed with which the swing or twist will take place. + The higher, the faster. + The ease with which the Joint twists, if it's too low, it takes more force to twist the joint. + Defines, how fast the swing- and twist-speed-difference on both sides gets synced. + The minimum difference between the pivot points' axes. + The maximum difference between the pivot points' axes. + A factor that gets applied to the movement accross the axes. The lower, the slower the movement. + The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. + The amount of damping that happens at the linear motion across the axes. + The minimum rotation in negative direction to break loose and rotate arround the axes. + The minimum rotation in positive direction to break loose and rotate arround the axes. + A factor that gets multiplied onto all rotations accross the axes. + The amount of rotational damping accross the axes. The lower, the more dampening occurs. + The amount of rotational restitution accross the axes. The lower, the more restitution occurs. + The maximum amount of force that can occur, when rotating arround the axes. + When correcting the crossing of limits in rotation accross 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. + Maximum acceleration for the motor at the axes. + If [code]set[/code] there is linear motion possible within the given limits. + If [code]set[/code] there is rotational motion possible. + If [code]set[/code] there is a rotational motor across these axes. + The [Shape] is a [PlaneShape]. + The [Shape] is a [RayShape]. + The [Shape] is a [SphereShape]. + The [Shape] is a [BoxShape]. + The [Shape] is a [CapsuleShape]. + The [Shape] is a [ConvexPolygonShape]. + The [Shape] is a [ConcavePolygonShape]. + The [Shape] is a [HeightMapShape]. + This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. + Constant to set/get gravity strength in an area. + Constant to set/get gravity vector/center in an area. + Constant to set/get whether the gravity vector of an area is a direction, or a center point. + Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. + This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. + Constant to set/get the linear dampening factor of an area. + Constant to set/get the angular dampening factor of an area. + Constant to set/get the priority (order of processing) of an area. This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. @@ -1215,70 +1413,102 @@ This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. + Constant for static bodies. + Constant for kinematic bodies. + Constant for rigid bodies. + Constant for rigid bodies in character mode. In this mode, a body can not rotate, and only its linear velocity is affected by physics. + Constant to set/get a body's bounce factor. + Constant to set/get a body's friction. + Constant to set/get a body's mass. + Constant to set/get a body's gravity multiplier. + Constant to set/get a body's angular dampening factor. + Constant to set/get a body's linear dampening factor. + This is the last ID for body parameters. Any attempt to set this property is ignored. Any attempt to get it returns 0. + Constant to set/get the current transform matrix of the body. + Constant to set/get the current linear velocity of the body. + Constant to set/get the current angular velocity of the body. + Constant to sleep/wake up a body, or to get whether it is sleeping. + Constant to set/get whether the body can sleep. + The value of the first parameter and area callback function receives, when an object enters one of its shapes. + The value of the first parameter and area callback function receives, when an object exits one of its shapes. + Constant to get the number of objects that are not sleeping. + Constant to get the number of possible collisions. + Constant to get the number of space regions where a collision could occur. + Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. + Constant to set/get the maximum distance a shape can be from another before they are considered separated. + Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. + Constant to set/get the threshold linear velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + Constant to set/get the threshold angular velocity of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after the time given. + Constant to set/get the maximum time of activity. A body marked as potentially inactive for both linear and angular velocity will be put to sleep after this time. + Constant to set/get the default solver bias for all physics constraints. A solver bias is a factor controlling how much two objects "rebound", after violating a constraint, to avoid leaving them in that state because of numerical imprecision. + The [Body] can rotate and move freely. + The [Body] cannot move across x axis can only rotate across x axis. + The [Body] cannot move across y axis can only rotate across y axis. + The [Body] cannot move across z axis can only rotate across z axis. diff --git a/doc/classes/PhysicsServerSW.xml b/doc/classes/PhysicsServerSW.xml index 7bffc23258b..53e1c0057ef 100644 --- a/doc/classes/PhysicsServerSW.xml +++ b/doc/classes/PhysicsServerSW.xml @@ -1,8 +1,10 @@ + Software implementation of [PhysicsServer]. + This class exposes no new methods or properties and should not be used, as [PhysicsServer] automatically selects the best implementation available. diff --git a/doc/classes/PinJoint.xml b/doc/classes/PinJoint.xml index 22aa35a0a44..1cc381b1b39 100644 --- a/doc/classes/PinJoint.xml +++ b/doc/classes/PinJoint.xml @@ -1,8 +1,10 @@ + Pin Joint for 3D Shapes. + Pin Joint for 3D Rigid Bodies. It pins 2 bodies (rigid or static) together. @@ -30,18 +32,28 @@ + The force with wich the pinned objects stay in positional relation to each other. + The higher, the stronger. + The force with wich the pinned objects stay in velocity relation to each other. + The higher, the stronger. + If above 0, this value is the maximum value for an impulse that this Joint produces. + The force with wich the pinned objects stay in positional relation to each other. + The higher, the stronger. + The force with wich the pinned objects stay in velocity relation to each other. + The higher, the stronger. + If above 0, this value is the maximum value for an impulse that this Joint produces. diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml index 826a1684a4f..009b0ec2f29 100644 --- a/doc/classes/PinJoint2D.xml +++ b/doc/classes/PinJoint2D.xml @@ -28,6 +28,7 @@ + The higher this value, the more the bond to the pinned partner can flex. diff --git a/doc/classes/SliderJoint.xml b/doc/classes/SliderJoint.xml index 617390b6a45..adea8658d12 100644 --- a/doc/classes/SliderJoint.xml +++ b/doc/classes/SliderJoint.xml @@ -1,8 +1,10 @@ + Piston kind of slider between two bodies in 3D. + Slides across the x-axis of the [Pivot] object. @@ -30,96 +32,144 @@ + 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 lower limit of rotation in the slider. + The amount of restitution of the rotation when the limit is surpassed. + Does not affect damping. + A factor applied to the all rotation once the limit is surpassed. + Makes all rotation slower when between 0 and 1. + The upper limit of rotation in the slider. + The amount of damping of the rotation in the limits. + The amount of restitution of the rotation in the limits. + A factor applied to the all rotation in the limits. + The amount of damping of the rotation across axes orthogonal to the slider. + The amount of restitution of the rotation across axes orthogonal to the slider. + A factor applied to the all rotation across axes orthogonal to the slider. + The amount of damping that happens once the limit defined by [member linear_limit/lower_distance] and [member linear_limit/upper_distance] is surpassed. + 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. + A factor applied to the movement accross the slider axis once the limits get surpassed. The lower, the slower the movement. + 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 restitution inside the slider limits. + A factor applied to the movement accross the slider axis as long as the slider is in the limits. The lower, the slower the movement. + The amount of damping when movement is accross axes orthogonal to the slider. + The amount of restitution when movement is accross axes orthogonal to the slider. + A factor applied to the movement accross axes orthogonal to the slider. + The maximum difference between the pivot points on their x-axis before damping happens. + The minimum difference between the pivot points on their x-axis before damping happens. + A factor applied to the movement accross the slider axis once the limits get surpassed. The lower, the slower the movement. + The amount of restitution once the limits are surpassed. The lower, the more velocityenergy gets lost. + The amount of damping once the slider limits are surpassed. + A factor applied to the movement accross the slider axis as long as the slider is in the limits. The lower, the slower the movement. + The amount of restitution inside the slider limits. + The amount of damping inside the slider limits. + A factor applied to the movement accross axes orthogonal to the slider. + The amount of restitution when movement is accross axes orthogonal to the slider. + The amount of damping when movement is accross axes orthogonal to the slider. + The upper limit of rotation in the slider. + The lower limit of rotation in the slider. + A factor applied to the all rotation once the limit is surpassed. + The amount of restitution of the rotation when the limit is surpassed. + The amount of damping of the rotation when the limit is surpassed. + A factor applied to the all rotation in the limits. + The amount of restitution of the rotation in the limits. + The amount of damping of the rotation in the limits. + A factor applied to the all rotation across axes orthogonal to the slider. + The amount of restitution of the rotation across axes orthogonal to the slider. + The amount of damping of the rotation across axes orthogonal to the slider. + End flag of PARAM_* constants, used internally. diff --git a/servers/physics/joints/pin_joint_sw.h b/servers/physics/joints/pin_joint_sw.h index ee9272ce061..f6c11c49b08 100644 --- a/servers/physics/joints/pin_joint_sw.h +++ b/servers/physics/joints/pin_joint_sw.h @@ -86,8 +86,8 @@ public: void set_pos_a(const Vector3 &p_pos) { m_pivotInA = p_pos; } void set_pos_b(const Vector3 &p_pos) { m_pivotInB = p_pos; } - Vector3 get_position_a() { return m_pivotInB; } - Vector3 get_position_b() { return m_pivotInA; } + Vector3 get_position_a() { return m_pivotInA; } + Vector3 get_position_b() { return m_pivotInB; } PinJointSW(BodySW *p_body_a, const Vector3 &p_pos_a, BodySW *p_body_b, const Vector3 &p_pos_b); ~PinJointSW();