Search Issue Tracker
By Design
Votes
1
Found in
4.3.0f4
Issue ID
585065
Regression
No
2D hinge joints teleport the object when entering play mode
To reproduce:
1. Open attached project
2. Open test scene
3. Enter play mode
Expected result: 2D hinge works just as 3D does
Actual result: 2D hinge teleports and get's messed up
Closed By Design:
The 2D hinge is configured incorrectly which is why it doesn't work.
The scale of the object is 1/1/1 therefore hinge anchor points are normalized to this however a Box of a size 0.4/4.15 is used and this has nothing to do with joints!
Therefore, the anchors need to be set on the Y axis correctly.
For the 2dchain hierarchy using the reference 1 as the root, 2 as the child, 3 as the next child and 4 as the final child I did the following:
2dchain1:
anchor = 0,2
connected anchor = 0,10 (global position of static position)
2dchain2:
anchor = 0,2
connected anchor = 0,-2
2dchain3:
anchor = 0,2
connected anchor = 0,-2
2dchain4:
anchor = 0,2
connected anchor = 0,-2
In other words, the anchor is the "top" of the chain and the connected anchor is the connected one, in this case you connect to the parent so "-2" is the Y position of the bottom of the chain.
The only oddity, which is soon to chain in a coming release, is the "2dchain1" which uses "0,10". When you don't specify a connected rigid-body then the static ground-body is used and this coordinate is a world-space body. This is okay until you wish to use this as a prefab. In the future, this will become a local-space value.
Also, in a coming release, joint anchors will be auto-calculated for some joints just like 3D.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] Audio sound is lower in the Player compared to the native music player
- Feet slide and misalign when playing retargeted animations
- IndexOutOfRangeException is thrown in NativePassCompiler when a graphics buffer is used in more than 5 render passes
- "Undo Stack Overflow" error is thrown, and Undo History is deleted when multiselected GameObjects are reparented to their GrandParents
- SearchColumn of type "ObjectReference" does not get refreshed for the custom SearchProvider when lighting generation finishes
Add comment