Search Issue Tracker
Won't Fix
Votes
18
Found in
2020.3.35f1
2021.3.5f1
2022.1.6f1
2022.2.0a17
2023.1.0a2
2023.2.0a1
2023.3.0a3
6000.0.0b11
Issue ID
UUM-7404
Regression
No
The joint.angle value changes when the parent changes rotation
To reproduce:
1) Open attached project and scene in it
2) Play it
3) Select "TwoProblems"
4) In scene view, start rotating it by y axis
Expected: In console, joint.angle value stays the same as it is only parent changing rotation, not the child
Actual: Angle changes upon rotating
Reproduced: 5.4.3p4, 5.5.2p4, 5.6.0f2, 2017.1.0a5
-
dididadadrm
Nov 18, 2022 09:47
something
-
jeroenopdebeek
Nov 18, 2019 21:39
For a simulation I'm running I have connected an arm to the robot base with a hinge joint. When the robot base rotates around a different axis than the hinge axis, the hinge.angle messes up, and becomes unusable.
-
Hamburgert
Nov 18, 2017 08:58
Reproduced the angle issue in 2017.2.0f3, and found a relatively simple way to reproduce it in the editor:
1: Create two cubes, cube A and cube B, and give them rigidbodies.
2: The Rigidbody on cube A should be kinematic, such that cube B can hang below cube A.
3: Attach a HingeJoint to cube B and connect it to the Rigidbody on cube A.
4: Attach a simple script to debug the value of hinge.angle. See example script below.
5: Enable limits from -90 to 90 degrees.
6: Enable motor, force 5, targetVelocity 50. (cube B should hit the limit at some point)
7: Play the scenario
8: When cube B hits the limit, use the editor (while still playing the scenario) to switch targetVelocity to -50
9: The hinge.angle will now reset to zero. (Note: The limits still seem to respect the original hinge.angle)Example debug hinge.angle C#
using UnityEngine;
public class ReportAngle : MonoBehaviour {
private HingeJoint hinge;
void OnGUI () {
if(!hinge) hinge = gameObject.GetComponent(typeof(HingeJoint)) as HingeJoint;
GUI.Label(new Rect(10,10,100,20), "angle: "+hinge.angle);
}
}
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Undeclared identifier 'LinearToSRGB'" error is thrown when creating a color variable with HDR color mode and assigning a Custom Render Texture target in Shader Graph
- Input System package is missing when creating a new HDRP project
- Inconsistent behaviour when interacting with different dropdown types with pointer events on parent Visual Element
- Hidden GameObjects won't re-enable when they have call "DontDestroyOnLoad" function
- Overlay Canvas are rendered on each split-screen camera when HDR is enabled
Resolution Note:
After review we have elected not to address this issue at this time.