NicknEma
NicknEma

Reputation: 478

How to apply transform in Unity

Is possible to apply a Transform via script in Unity?

What I mean with "applying" is setting the current position/rotation/scale of an object AS their default ones: if a game object is rotated by 30° on the x axis, the x rotation value on the Inspector will display 30 of course. By applying the rotation the Inspector will now display 0 and the object will keep its rotation. 30° is now the default rotation of that object.

I know you can do this, for example, in Blender, but I don't know if it's possible to do it in Unity as well.

Upvotes: 3

Views: 14929

Answers (1)

TheTJO
TheTJO

Reputation: 31

You cannot "apply" it directly to the object, but you can make a parent object, rotate this object when needed and "apply" the rotation or position to the child object, in this case the model.

Your hierachy should look something like this

- Parent (this is the object you want to rotate/position/scale)
  - Child (this is the model, you "apply"/set default values to that object)

Upvotes: 3

Related Questions