Transform unity что это

Трансформации

Редактирование трансформаций

Компоненты Transform управляются в 3D пространстве по осям X, Y, и Z, или в 2D пространстве просто по X и Y. В Unity эти оси представлены красным, зелёным и синим цветами соответственно.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаTramsform c цветными осями

Transform может быть изменён в окне Scene или путём изменения параметров в инспекторе. В сцене вы можете изменять Transform используя инструменты Translate, Rotate и Scale (двигать, вращать и масштабировать). Эти инструменты расположены в верхнем левом углу редактора Unity.

Transform unity что это. Transform Tools. Transform unity что это фото. Transform unity что это-Transform Tools. картинка Transform unity что это. картинка Transform ToolsИнструменты View, Translate, Rotate и Scale

Эти инструменты можно применить к любому объекту в сцене. Когда вы кликнете на объект, вы увидите, что у объекта появится гизмо инструмента. Вид гизмо зависит от выбранного инструмента.

Transform unity что это. TransformGizmo35. Transform unity что это фото. Transform unity что это-TransformGizmo35. картинка Transform unity что это. картинка TransformGizmo35Гизмо Transfrom’а

Когда вы нажмёте на одной из трёх осей гизмо и потянете, вы заметите, что её цвет изменится на жёлтый. По мере движения мыши, вы увидите как объект будет двигаться, вращаться или менять размер соответственно выбранной оси. Когда вы отпускаете кнопку мыши, ось остаётся выделенной. Если вы впоследствии будете двигать мышь с зажатым колёсиком, то будет использована последняя выбранная ось, независимо от позиции курсора мыши.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаTransfrom с выделенной (жёлтой) осью X

Наследование

Вы можете создать родительский объект перетягиванием любого GameObject’а в окне Hierarchy на другой объект. Это создаст связь родительский-дочерний между двумя игровыми объектами.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаПример родительской иерархии. Объекты с раскрывающимися стрелками слева от их имён являются родительскими.

Проблемы производительности и ограничения неравномерного (Non-Uniform) масштабирования

Важность масштаба

Есть 3 фактора которые могут повлиять на масштаб вашего объекта:

В идеале, вам не надо настраивать параметр Scale вашего объекта в компоненте Transform. Лучшим вариантом является создание моделей реалистичного размера, таким образом, чтобы вам не пришлось менять масштаб. Следующим лучшим вариантом является настройка масштаба в настройках Import Settings импортированного меша, для конкретного меша. Некоторые оптимизации производятся на основе размера при импорте, и создание экземпляра объекта с изменённым значением масштаба может снизить производительность. Для дополнительной информации, прочитайте раздел об оптимизации масштаба на странице справки по компоненту Rigidbody.

Источник

Трансформации

Редактирование трансформаций

Компоненты Transform управляются в 3D пространстве по осям X, Y, и Z, или в 2D пространстве просто по X и Y. В Unity эти оси представлены красным, зелёным и синим цветами соответственно.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаA transform showing the color-coding of the axes

Transform может быть изменён в окне Scene или путём изменения параметров в инспекторе. В сцене вы можете изменять Transform используя инструменты Translate, Rotate и Scale (двигать, вращать и масштабировать). Эти инструменты расположены в верхнем левом углу редактора Unity.

Transform unity что это. Transform Tools. Transform unity что это фото. Transform unity что это-Transform Tools. картинка Transform unity что это. картинка Transform ToolsThe View, Translate, Rotate, and Scale tools

Эти инструменты можно применить к любому объекту в сцене. Когда вы кликнете на объект, вы увидите, что у объекта появится гизмо инструмента. Вид гизмо зависит от выбранного инструмента.

Transform unity что это. TransformGizmo35. Transform unity что это фото. Transform unity что это-TransformGizmo35. картинка Transform unity что это. картинка TransformGizmo35Transform gizmo

When you click and drag on one of the three gizmo axes, you will notice that its color changes to yellow. As you drag the mouse, you will see the object translate, rotate, or scale along the selected axis. When you release the mouse button, the axis remains selected.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаTransfrom с выделенной (жёлтой) осью X

Наследование

Вы можете создать родительский объект перетягиванием любого GameObject’а в окне Hierarchy на другой объект. Это создаст связь родительский-дочерний между двумя игровыми объектами.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаExample of a Parent-Child hierarchy. GameObjects with foldout arrows to the left of their names are parents.

Учтите, что значения Transform в инспекторе для любого дочернего объекта показаны относительно значений Transform родительского объекта. Эти значения известны как локальные координаты. Возвращаясь к аналогии тела и рук, положение вашего тела может изменяться по мере ходьбы, но ваши руки будут присоединены в одном и том же месте относительно тела. Для построения сцены обычно достаточно работать с локальными координатами для дочерних объектов, но во время игрового процесса зачастую полезно найти их точное положение в мировом пространстве или их мировые координаты. API скриптинга для компонента Transform имеет отдельные настройки для локальных и мировых координат.

Проблемы производительности и ограничения неравномерного (Non-Uniform) масштабирования

Важность масштаба

Есть 3 фактора которые могут повлиять на масштаб вашего объекта:

В идеале, вам не надо настраивать параметр Scale вашего объекта в компоненте Transform. Лучшим вариантом является создание моделей реалистичного размера, таким образом, чтобы вам не пришлось менять масштаб. Следующим лучшим вариантом является настройка масштаба в настройках Import Settings импортированного меша, для конкретного меша. Некоторые оптимизации производятся на основе размера при импорте, и создание экземпляра объекта с изменённым значением масштаба может снизить производительность. Для дополнительной информации, прочитайте раздел об оптимизации масштаба на странице справки по компоненту Rigidbody.

Источник

Transforms

The Transform Component

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинка

Properties

Property:Function:
PositionPosition of the Transform in X, Y, and Z coordinates.
RotationRotation of the Transform around the X, Y, and Z axes, measured in degrees.
ScaleScale of the Transform along X, Y, and Z axes. Value “1” is the original size (size at which the object was imported).

The position, rotation and scale values of a Transform are measured relative to the Transform’s parent. If the Transform has no parent, the properties are measured in world space.

Editing Transforms

Transforms are manipulated in 3D space in the X, Y, and Z axes or in 2D space in just X and Y. In Unity, these axes are represented by the colors red, green, and blue respectively.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаA transform showing the color-coding of the axes

Transform unity что это. Transform Tools. Transform unity что это фото. Transform unity что это-Transform Tools. картинка Transform unity что это. картинка Transform ToolsThe View, Translate, Rotate, and Scale tools

The tools can be used on any object in the scene. When you click on an object, you will see the tool gizmo A graphic overlay associated with a GameObject in a Scene, and displayed in the Scene View. Built-in scene tools such as the move tool are Gizmos, and you can create custom Gizmos using textures or scripting. Some Gizmos are only drawn when the GameObject is selected, while other Gizmos are drawn by the Editor regardless of which GameObjects are selected. More info
See in Glossary appear within it. The appearance of the gizmo depends on which tool is selected.

Transform unity что это. TransformGizmo35. Transform unity что это фото. Transform unity что это-TransformGizmo35. картинка Transform unity что это. картинка TransformGizmo35Transform gizmo

When you click and drag on one of the three gizmo axes, you will notice that its color changes to yellow. As you drag the mouse, you will see the object translate, rotate, or scale along the selected axis. When you release the mouse button, the axis remains selected.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаA Transform showing the selected (yellow) X axis

There is also an additional option in Translate mode to lock movement to a particular plane (ie, allow dragging in two of the axes while keeping the third unchanged). The three small coloured squares around the center of the Translate gizmo activate the lock for each plane; the colors correspond to the axis that will be locked when the square is clicked (eg, blue locks the Z axis).

Parenting

Parenting is one of the most important concepts to understand when using Unity. When a GameObject is a Parent An object that contains child objects in a hierarchy. When a GameObject is a Parent of another GameObject, the Child GameObject will move, rotate, and scale exactly as its Parent does. You can think of parenting as being like the relationship between your arms and your body; whenever your body moves, your arms also move along with it. More info
See in Glossary of another GameObject, the Child GameObject will move, rotate, and scale exactly as its Parent does. You can think of parenting as being like the relationship between your arms and your body; whenever your body moves, your arms also move along with it. Child objects can also have children of their own and so on. So your hands could be regarded as “children” of your arms and then each hand has several fingers, etc. Any object can have multiple children, but only one parent. These multiple levels of parent-child relationships form a Transform hierarchy. The object at the very top of a hierarchy (ie, the only object in the hierarchy that doesn’t have a parent) is known as the root.

You can create a Parent by dragging any GameObject in the Hierarchy View onto another. This will create a Parent-Child relationship between the two GameObjects.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаExample of a Parent-Child hierarchy. GameObjects with foldout arrows to the left of their names are parents.

Note that the Transform values in the Inspector for any child GameObject are displayed relative to the Parent’s Transform values. These values are referred to as local coordinates. Returning to the analogy of body and arms, the position of your body may move as you walk but your arms will still be attached at the same relative position. For scene construction, it is usually sufficient to work with local coordinates for child objects but in gameplay it is often useful to find their exact position in world space or global coordinates. The scripting API for the Transform component has separate properties for local and global position, rotation and scale and also allows you to convert any point between local and global coordinates.

Limitations with Non-Uniform Scaling

Non-uniform scaling is when the Scale in a Transform has different values for x, y, and z; for example (2, 4, 2). In contrast, uniform scaling has the same value for x, y, and z; for example (3, 3, 3). Non-uniform scaling can be useful in a few specific cases but it introduces a few oddities that don’t occur with uniform scaling:-

Importance of Scale

The scale of the Transform determines the difference between the size of a mesh in your modeling application and the size of that mesh in Unity. The mesh’s size in Unity (and therefore the Transform’s scale) is very important, especially during physics simulation. By default, the physics engine A system that simulates aspects of physical systems so that objects can accelerate correctly and be affected by collisions, gravity and other forces. More info
See in Glossary assumes that one unit in world space corresponds to one metre. If an object is very large, it can appear to fall in “slow motion”; the simulation is actually correct since effectively, you are watching a very large object falling a great distance.

There are three factors that can affect the scale of your object:

Ideally, you should not adjust the Scale of your object in the Transform Component. The best option is to create your models at real-life scale so you won’t have to change your Transform’s scale. The next best option is to adjust the scale at which your mesh is imported in the Import Settings for your individual mesh. Certain optimizations occur based on the import size, and instantiating an object that has an adjusted scale value can decrease performance. For more information, see the section about optimizing scale on the Rigidbody component reference page.

Источник

Transforms

The Transform Component

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинка

Properties

Property:Function:
PositionPosition of the Transform in X, Y, and Z coordinates.
RotationRotation of the Transform around the X, Y, and Z axes, measured in degrees.
ScaleScale of the Transform along X, Y, and Z axes. Value “1” is the original size (size at which the object was imported).

The position, rotation and scale values of a Transform are measured relative to the Transform’s parent. If the Transform has no parent, the properties are measured in world space.

Editing Transforms

Transforms are manipulated in 3D space in the X, Y, and Z axes or in 2D space in just X and Y. In Unity, these axes are represented by the colors red, green, and blue respectively.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаA transform showing the color-coding of the axes

Transform unity что это. Transform Tools. Transform unity что это фото. Transform unity что это-Transform Tools. картинка Transform unity что это. картинка Transform ToolsThe View, Translate, Rotate, and Scale tools

The tools can be used on any object in the scene. When you click on an object, you will see the tool gizmo A graphic overlay associated with a GameObject in a Scene, and displayed in the Scene View. Built-in scene tools such as the move tool are Gizmos, and you can create custom Gizmos using textures or scripting. Some Gizmos are only drawn when the GameObject is selected, while other Gizmos are drawn by the Editor regardless of which GameObjects are selected. More info
See in Glossary appear within it. The appearance of the gizmo depends on which tool is selected.

Transform unity что это. TransformGizmo35. Transform unity что это фото. Transform unity что это-TransformGizmo35. картинка Transform unity что это. картинка TransformGizmo35Transform gizmo

When you click and drag on one of the three gizmo axes, you will notice that its color changes to yellow. As you drag the mouse, you will see the object translate, rotate, or scale along the selected axis. When you release the mouse button, the axis remains selected.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаA Transform showing the selected (yellow) X axis

There is also an additional option in Translate mode to lock movement to a particular plane (ie, allow dragging in two of the axes while keeping the third unchanged). The three small coloured squares around the center of the Translate gizmo activate the lock for each plane; the colors correspond to the axis that will be locked when the square is clicked (eg, blue locks the Z axis).

Parenting

Parenting is one of the most important concepts to understand when using Unity. When a GameObject is a Parent An object that contains child objects in a hierarchy. When a GameObject is a Parent of another GameObject, the Child GameObject will move, rotate, and scale exactly as its Parent does. You can think of parenting as being like the relationship between your arms and your body; whenever your body moves, your arms also move along with it. More info
See in Glossary of another GameObject, the Child GameObject will move, rotate, and scale exactly as its Parent does. You can think of parenting as being like the relationship between your arms and your body; whenever your body moves, your arms also move along with it. Child objects can also have children of their own and so on. So your hands could be regarded as “children” of your arms and then each hand has several fingers, etc. Any object can have multiple children, but only one parent. These multiple levels of parent-child relationships form a Transform hierarchy. The object at the very top of a hierarchy (ie, the only object in the hierarchy that doesn’t have a parent) is known as the root.

You can create a Parent by dragging any GameObject in the Hierarchy View onto another. This will create a Parent-Child relationship between the two GameObjects.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаExample of a Parent-Child hierarchy. GameObjects with foldout arrows to the left of their names are parents.

Note that the Transform values in the Inspector for any child GameObject are displayed relative to the Parent’s Transform values. These values are referred to as local coordinates. Returning to the analogy of body and arms, the position of your body may move as you walk but your arms will still be attached at the same relative position. For scene construction, it is usually sufficient to work with local coordinates for child objects but in gameplay it is often useful to find their exact position in world space or global coordinates. The scripting API for the Transform component has separate properties for local and global position, rotation and scale and also allows you to convert any point between local and global coordinates.

Limitations with Non-Uniform Scaling

Non-uniform scaling is when the Scale in a Transform has different values for x, y, and z; for example (2, 4, 2). In contrast, uniform scaling has the same value for x, y, and z; for example (3, 3, 3). Non-uniform scaling can be useful in a few specific cases but it introduces a few oddities that don’t occur with uniform scaling:-

Importance of Scale

The scale of the Transform determines the difference between the size of a mesh in your modeling application and the size of that mesh in Unity. The mesh’s size in Unity (and therefore the Transform’s scale) is very important, especially during physics simulation. By default, the physics engine A system that simulates aspects of physical systems so that objects can accelerate correctly and be affected by collisions, gravity and other forces. More info
See in Glossary assumes that one unit in world space corresponds to one metre. If an object is very large, it can appear to fall in “slow motion”; the simulation is actually correct since effectively, you are watching a very large object falling a great distance.

There are three factors that can affect the scale of your object:

Ideally, you should not adjust the Scale of your object in the Transform Component. The best option is to create your models at real-life scale so you won’t have to change your Transform’s scale. The next best option is to adjust the scale at which your mesh is imported in the Import Settings for your individual mesh. Certain optimizations occur based on the import size, and instantiating an object that has an adjusted scale value can decrease performance. For more information, see the section about optimizing scale on the Rigidbody component reference page.

Источник

Transforms

The Transform Component

Компонент Transform определяет Position (положение), Rotation (вращение), и Scale (масштаб) каждого объекта в сцене. У каждого GameObject’а есть Transform.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинка

Свойство:Функция:
PositionПоложение Transform’а в координатах X, Y, и Z.
RotationВращение Transform’а вокруг осей X, Y, и Z, измеряется в градусах.
ScaleМасштаб Transform’а вдоль осей X, Y, и Z. Значение “1” означает оригинальный размер (размер, с которым был импортирован объект).

Значения положения, вращения и масштаба Transform’а измеряются относительно его родителя. Если у Transform’а нет родителя, тогда все эти свойства измеряются в мировом пространстве.

Editing Transforms

Компоненты Transform управляются в 3D пространстве по осям X, Y, и Z, или в 2D пространстве просто по X и Y. В Unity эти оси представлены красным, зелёным и синим цветами соответственно.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаA transform showing the color-coding of the axes

Transform может быть изменён в окне Scene или путём изменения параметров в инспекторе. В сцене вы можете изменять Transform используя инструменты Translate, Rotate и Scale (двигать, вращать и масштабировать). Эти инструменты расположены в верхнем левом углу редактора Unity.

Transform unity что это. Transform Tools. Transform unity что это фото. Transform unity что это-Transform Tools. картинка Transform unity что это. картинка Transform ToolsThe View, Translate, Rotate, and Scale tools

Эти инструменты можно применить к любому объекту в сцене. Когда вы кликнете на объект, вы увидите, что у объекта появится гизмо инструмента. Вид гизмо зависит от выбранного инструмента.

Transform unity что это. TransformGizmo35. Transform unity что это фото. Transform unity что это-TransformGizmo35. картинка Transform unity что это. картинка TransformGizmo35Transform gizmo

When you click and drag on one of the three gizmo axes, you will notice that its color changes to yellow. As you drag the mouse, you will see the object translate, rotate, or scale along the selected axis. When you release the mouse button, the axis remains selected.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаTransfrom с выделенной (жёлтой) осью X

Вы можете создать родительский объект перетягиванием любого GameObject’а в окне Hierarchy на другой объект. Это создаст связь родительский-дочерний между двумя игровыми объектами.

Transform unity что это. . Transform unity что это фото. Transform unity что это-. картинка Transform unity что это. картинкаExample of a Parent-Child hierarchy. GameObjects with foldout arrows to the left of their names are parents.

Учтите, что значения Transform в инспекторе для любого дочернего объекта показаны относительно значений Transform родительского объекта. Эти значения известны как локальные координаты. Возвращаясь к аналогии тела и рук, положение вашего тела может изменяться по мере ходьбы, но ваши руки будут присоединены в одном и том же месте относительно тела. Для построения сцены обычно достаточно работать с локальными координатами для дочерних объектов, но во время игрового процесса зачастую полезно найти их точное положение в мировом пространстве или их мировые координаты. API скриптинга для компонента Transform имеет отдельные настройки для локальных и мировых координат.

Limitations with Non-Uniform Scaling

Importance of Scale

Есть 3 фактора которые могут повлиять на масштаб вашего объекта:

В идеале, вам не надо настраивать параметр Scale вашего объекта в компоненте Transform. Лучшим вариантом является создание моделей реалистичного размера, таким образом, чтобы вам не пришлось менять масштаб. Следующим лучшим вариантом является настройка масштаба в настройках Import Settings импортированного меша, для конкретного меша. Некоторые оптимизации производятся на основе размера при импорте, и создание экземпляра объекта с изменённым значением масштаба может снизить производительность. Для дополнительной информации, прочитайте раздел об оптимизации масштаба на странице справки по компоненту Rigidbody.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *