E.g I have changed the scale and rotation of a MeshInstance
and I want the editor and GDscripts to accept new settings as scale 1 and rotation 0 degrees in all axes.
-
1\$\begingroup\$ I've never seen a game engine have such a scale/rotation "apply" feature. That's usually something that's handled in the 3D modelling software beforehand. Have you considered creating an empty parent object with scale 1 and 0 rotation, and placing your scaled/rotated MeshInstance as a child of this object, then have your GDscripts refer to the parent? That's how we'd tackle a similar situation in Unity for example. \$\endgroup\$– DMGregory ♦Commented Oct 2, 2020 at 20:24
-
\$\begingroup\$ @DMGregory That makes sense, thanks. \$\endgroup\$– previous_developerCommented Oct 3, 2020 at 17:55
1 Answer
You put the MeshInstance
inside of a Spatial
node. Then place the MeshInstance
as needed. Then you can manipulate the Spatial
node.
Furthermore, you can save the Spatial
node as a scene. The scene will have an internal tree where the MeshInstance
exists.
Then you can add that scene in another parent scene, and it will appear as a single node, with the fact that is has a MeshInstance
and that said MeshInstance
was moved hidden from view.
You can do that to create an scene that has all the nodes you need for your particular game object (eg. KinematicBoy
/RigidBody
/StaticBody
, lights, camera, and so on), and then use it as a single node in scene that represent a stage.