Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 605
NicknEma Avatar asked Oct 28 '25 06:10

NicknEma


1 Answers

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)
like image 87
TheTJO Avatar answered Oct 30 '25 12:10

TheTJO