Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bullet] HingeJoint deprecation message prints even for default property setup #42678

Open
Tracked by #45022
TwistedTwigleg opened this issue Oct 9, 2020 · 3 comments

Comments

@TwistedTwigleg
Copy link
Contributor

Godot version:
Godot 3.2.3 Stable, Windows 10.

OS/device including version:
Windows 10, 64-bit.

Issue description:
When a HingeJoint node is created and one of the two nodes for the joint are setup, the following deprecation warning is always printed:

set_param: The HingeJoint parameter 0 is deprecated

The code for this deprecation print can be found here for Godot 3.2.

This issue was first discovered by Dominic on the Godot Forums: Can I disable the "HingeJoint parameter deprecated" warning?

Steps to reproduce:

Make a HingeJoint node and assign one of its two Node slots to a valid node. This will cause the message to be printed, even if no properties on the joint were changed.

Minimal reproduction project:
HingeJoint_DeprecationWarning_Project.zip

@KoBeWi
Copy link
Member

KoBeWi commented Oct 9, 2020

The warning comes from here: (message is changed in 4.0)

void HingeJointBullet::set_param(PhysicsServer3D::HingeJointParam p_param, real_t p_value) {
switch (p_param) {
case PhysicsServer3D::HINGE_JOINT_BIAS:
WARN_DEPRECATED_MSG("The HingeJoint3D parameter \"bias\" is deprecated.");
break;

EDIT:
Ok, here's what causes it:

for (int i = 0; i < PARAM_MAX; i++) {
PhysicsServer3D::get_singleton()->hinge_joint_set_param(j, PhysicsServer3D::HingeJointParam(i), params[i]);
}

Probably the easiest way to solve this would be making the loop go from 1, but I imagine it can break lots of things (and there isn't any deprecation warning in Godot Physics).

@madmiraal
Copy link
Contributor

Related to #42286.

@pouleyKetchoupp pouleyKetchoupp changed the title HingeJoint deprecation message prints even for default property setup [Bullet] HingeJoint deprecation message prints even for default property setup Jan 15, 2021
@Zylann
Copy link
Contributor

Zylann commented Dec 4, 2021

Still occurring in Godot 3.4.1 rc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants