缩放时如何使对象仅在一侧生长?

时间:2018-09-17 06:51:22

标签: unity3d

enter image description here

我想从一侧缩放3d对象,这个问题我将通过滑块示例来详细说明。 As per the image when I am scaling it is scaled through center. I want to fix the left side as static and scale the slider to only right side.

1 个答案:

答案 0 :(得分:2)

将此对象的枢轴点设置为左侧。

我假设您是在谈论Image组件。它使用RectTransform,您可以在其中设置枢轴点,如下所示:

enter image description here

或直接打开该菜单,按住Shit + Alt并单击此处:

enter image description here


或者使该对象成为另一个空GameObject的子代。 设置此对象的位置,以使左点与父级的枢轴点匹配。而不是缩放新的父对象。