Jump to content

sub parts?


Recommended Posts

I have a model of a part containing multiple little parts (lets say its a box with levers) ... now, how can I move those levers? I only found the variables for the whole object. But not for it's parts... or is this done differently? Animations like closing doors and things like that? (I'd prefer not to use a script inside the mu file).

Link to comment
Share on other sites

14 hours ago, Rudolf Meier said:

I have a model of a part containing multiple little parts (lets say its a box with levers) ... now, how can I move those levers? I only found the variables for the whole object. But not for it's parts... or is this done differently? Animations like closing doors and things like that? (I'd prefer not to use a script inside the mu file).

Two ways to do this --

1.) Easy -- You need to split the moving bits off into their own objects/meshes.  Use either your modeling programs or the Unity Editor animation tools to animate these objects.
2.) Hard -- Rig your model with an armature / skinned-mesh setup / bone-rigging.  Often known as 'riggin' or 'skinning' a model.  Probably massive overkill for animating some levers or blinking lights or w/e.

After you decide which of those methods to use, and give some information about the tools at your disposal (what modeling program do you use?), I'm sure someone could link some tutorials relevant to what you are doing and the programs you are using.

Link to comment
Share on other sites

2 hours ago, Shadowmage said:

Two ways to do this --

1.) Easy -- You need to split the moving bits off into their own objects/meshes.  Use either your modeling programs or the Unity Editor animation tools to animate these objects.
2.) Hard -- Rig your model with an armature / skinned-mesh setup / bone-rigging.  Often known as 'riggin' or 'skinning' a model.  Probably massive overkill for animating some levers or blinking lights or w/e.

After you decide which of those methods to use, and give some information about the tools at your disposal (what modeling program do you use?), I'm sure someone could link some tutorials relevant to what you are doing and the programs you are using.

Thanks a lot for this info... currently I'm playing around with the transform.GetChild-function and ... it seems that this could do the job right now. But I will look into what you said and try to find samples for everything you said, simply to be sure that I'm not using the wrong solution ... maybe I have questions after that

Link to comment
Share on other sites

45 minutes ago, Rudolf Meier said:

Thanks a lot for this info... currently I'm playing around with the transform.GetChild-function and ... it seems that this could do the job right now. But I will look into what you said and try to find samples for everything you said, simply to be sure that I'm not using the wrong solution ... maybe I have questions after that

I guess there is also a 3rd option (which is what you are attempting, as far as I can tell)

3.) Get access to the mesh/objects from plugin script, and manually manipulate the transforms from there.  You can rotate, move, and scale them through plugin code pretty easily.


If all you are looking for is some -animated models- I would strongly suggest using the animation tools in your modeling program (I use Blender), or the animation tools in the Unity Editor (workable, but usually not as easy as doing it in the modeling program).

Now, if you are looking to have those animations interact with some PartModules / plugin code (more than just click button->play animation)... it gets a bit more complex.  For some uses you can still setup the animations in the modeling program, and then manipulate the -animations- from within plugin code.  For other uses, you'll have to resort to #3 (plugin-based transform manipulation).

It all depends on exactly what you are trying to do.

Edit:  And as to your OP -- there is no such thing as a 'script in a .mu file'.  Scripts are plugin code, that are loaded separately from models.  Models may contain pre-defined 'animations'... but these are not scripts.

Edited by Shadowmage
Link to comment
Share on other sites

14 minutes ago, Shadowmage said:

It all depends on exactly what you are trying to do.

Edit:  And as to your OP -- there is no such thing as a 'script in a .mu file'.  Scripts are plugin code, that are loaded separately from models.  Models may contain pre-defined 'animations'... but these are not scripts.

Well, to be honest... right now I don't know what I want to do. I only know that it has to do with robotics (at the moment). Currently I'm playing around with a lot of mods and try to copy them to learn what can be done.

I thought animations are scripts as well. Maybe I'd have to investigate them also a little bit more.

At least I can say that your information help me a lot to better understand those things.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...