Depending on why you need Z-spacing, you could set the Z Spacing
property to a minimum non-zero value such as 0.001
or the like, in order to not face Z-buffer issues when writing to the Z-buffer. If this does not resolve your issue, and you require a large offset in arbitrary direction, I'm afraid there will be no way around modifying the MeshGenerator
class to add e.g. a Vector3 spacingDirection
vector and add this vector to each vertex position (multiplied by the already existing spacing distance) instead of only modifying z position alone.
Update: I discovered the SkeletonUtility component which lets you override the position of bones. It even has a checkbox for zposition. I thought that was going to be the answer but it doesn't seem to let me modify the z position after all. Looking at the code, I don't see anything done with that variable. Is there any way to make this work?
Thanks for reporting, and sorry for the troubles! Basically modifying Z Position
alone would not solve your issue here, as it would have the same effect as modifying Z Spacing
. Nevertheless, you have indeed discovered a bug there, the Z Position
property had no effect before. A bugfix commit has just been pushed to the 4.2-beta branch, a new 4.2-beta unitypackage will be published soon.
Issue ticket URL for later reference:
EsotericSoftware/spine-runtimes2255