Update log
Full GearBlocks update
The complete published notes, normalized for clean reading and source attribution.
Repeated intro
Hey everyone, I've just released another update, mainly focused on fixing bugs (some caused by changes in the previous update)!
Extracted changes
- Fixes
- Performance
- Gameplay
- Workshop
- Balance
I won't cover everything here, but I'll mention the major problem areas that were addressed. If you want to see a list of all the specific bug fix changes, please check out the #git-history channel on the GearBlocks Discord.
Unity Upgrade Physics Fallout
Some problems emerged after upgrading to Unity 6.0 in the previous update.
Swap Bodies for Gear and Pulley Physics
Originally, for gear and pulley physics constraints, "swap bodies" was enabled based on the connected rigidbodies relative masses. This was to ensure that the more massive rigidbody is considered the "owner" of the constraint by the physics engine, which can improve simulation stability.
I removed the code that enabled swap bodies during the Unity upgrade because something changed in Unity 6 that broke how joint anchors and axes are set up with swap bodies enabled.
This didn't seem to make any difference in my tests, so I figured things were OK without it. However this turns out to not be the case, some player creations very much need the improved simulation stability from swap bodies being enabled!
So swap bodies has now been reinstated for gear and pulley constraints. This required a hack to work in Unity 6, clearing the connected rigid body before updating the joint anchors and axes, and then setting it back afterwards. This ensures the anchors and axes behave correctly, although constantly setting the connected body comes with a slight performance cost.
Broadphase Type
Originally the broadphase type was set to "automatic box prune", but with the Unity upgrade I switched it to "sweep and prune" to improve performance in the "Welcome Tutorial" scenario.
However this change caused a massive physics simulation performance penalty for some particular player creations. I think this is because these creations have a lot of overlapping parts (and therefore colliders), which seems not well suited to sweep and prune.
As a result broadphase is now set back to automatic box prune.
Grabber Tool "Shove"
This was using AddForceAtPosition with the VelocityChange force mode, and got broken by the upgrade because Unity changed how torque is calculated when using this force mode.
To get the same behaviour as before, the fix was to use the Impulse force mode instead and multiply the applied force by the rigidbody mass..
Consequences of Allowing Temporary Links
In the previous update changes were made to temporarily allow links between parts that don't belong to the same construction (as long as the constructions remain frozen).
I believe this was a worthwhile improvement that prevented links being lost while building, but it did introduce several knock on issues which all required addressing:-
Serialization was broken for constructions with these temporary links, preventing saves from being loaded.
Pulley belts were broken between linked pulleys that were not (yet) part of the same construction.
Linked engine crank and cylinder parts could be moved such that the con-rod between them was unrealistically stretchy or pistons could appear in weird places.
Links were being left intact between parts that had broken off due to collision damage.
An engine con-rod will now "break" if the linked crank and cylinder are moved too far relative to one another, similar to the way pulley belts break.
NOTE: I've added an "unbreakable con-rod" option to the engine cylinder part behaviour to disable this if required.
Broken Undo / Redo
The game's undo /
Source
