Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Ways to create a single player object from interchangable parts?

Discussion in 'Game Design' started by Ares13, Aug 7, 2019.

  1. Ares13

    Ares13

    Joined:
    Jul 21, 2019
    Posts:
    2
    I am trying to create a player character that can be upgraded by part but I am not sure of the cleanest way to pull this off. I have thought about creating a different mesh for each part and destroying the mesh to call a new one but not 100% if this would give the same animations available to every changed mesh and how efficient this would be compared to creating each limb individually and stitching it on as it changes having one constant such as the head on a person or the cockpit of a spaceship. I have read many forums and watched tutorials to try to figure this out but even the stitching together forum I read was a topic from 2009 I believe and was hoping that maybe their was a feature in Unity or maybe Blender that would make this easier than animating each part individually. Any ideas out there? All help is much appreciated. Thank You.
     
  2. Steve_Stevens

    Steve_Stevens

    Joined:
    May 3, 2016
    Posts:
    17
    There is a fairly simple, but time consuming solution. This is quick and dirty, with no manual weighting applied, but it will work.

    I am a coder, not an artist, and I don’t remember all the keys to press to get this done, but if I was in front of my machine, I could figure it out. So I am going to assume you know how to highlight, duplicate, and cut faces.

    Let’s make a shirt in blender.
    Open your model, save it as shirt (no mistakes! Make a new model right now).
    Highlight all the faces that you want to be a shirt. Duplicate those faces, separate that from the model. Delete ALL the faces for your base model. You should just have a shirt left. Select the shirt, select the armature, join the shirt to the armature. Save again. When you export this, model, you’ll have a shirt prefab. You COULD add a material and UV unwrap it so you could create custom textures and only need 1 model. When you import that model into unity, make it a prefab. I’ve got some code that when you apply the shirt, it removes the faces on your model and puts your shirts faces in its place.

    If you want some more in depth help, message me back. I’ve actually got a YouTube video tutorial that shows you everything. Once you code the character customized, it’s supper easy!

    If you are good in blender, let’s talk! I’ll code for you if you make me some clothes using this method.
     
  3. Ares13

    Ares13

    Joined:
    Jul 21, 2019
    Posts:
    2
    I am not exactly good at anything exactly as a college graduate 6 years ago with very few chances to work on game development since then. I can write code and have developed models in 3ds max student version and blender for tutorials but I'm currently out of work and am trying to make game development my career since my last one as a cnc operator didn't work out. In other words I am a Jack of all trades but not great at anything. I have four games I'm working on that require the ability to switch out parts of a player mesh mid battle and be able to make them interchangeable as the collider is contacted by the weapon or weapon blast depending on the game. I still have to figure out if this is possible over a network connection so I can have a PvP fight mode with this as my character's damage calculator.

    In other words think a bushido blade body damage with interchangeable parts to show the damage done in the fight with possible removed limbs but death only comes upon bleed out, head removal, or vital organ hits (mainly brain and heart). So I I'm just looking for the best way to proceed with this if I wanted a 1 on 1 fight with PvP fights over a network connection for now that I can hopefully evolve to a 5 on 5 spaceship fight that will cause damage to specific components depending on area hit? I know this is a large project and I'm having problems understanding how I should plan out my game for this part. I've watched videos and been able to follow most of the stuff in videos from Brackeys, Sebastian Lague, Kristin Stock, BlenderGuru, GameDev.Tv, and GameDevHQ for ideas and I come close to it at points but I'm still lost on keeping bones and animations as limbs get shorter so I was looking for more helpful videos or tutorials also. Anything may help and thank you.
     
    Last edited: Aug 8, 2019