1. The space forums use a separate registration system from the main virtual world. To comment on these forums, you need to create a separate forum account.
    Dismiss Notice
  2. Hey there, if you want some direct help without hopping inworld - try our Discord channel at https://discord.gg/mptfycQ
    Dismiss Notice

Editor Pack 7.1 - Costumes & Animators

Discussion in 'General' started by Adam, Oct 7, 2016.

Share This Page

  1. Adam

    By:AdamOct 7, 2016
    Staff Member Moderator

    Aug 21, 2014
    Likes Received:
    The key feature of Editor Pack 7 is the new Costumes and Animators system which allow you to replace avatars completely with whatever you like. I've personally got an arachnid as my avatar now - you can do whatever you like.

    There is two parts to this particular feature - Costumes - costumes are a object which replaces your base skeleton mesh with something entirely custom. We load the GameObject whole and insert it into the avatar hierarchy on load, so it does not need to be a mesh you replace with - a particle system could be used for example as your avatar. You can still animate this using normal animation systems (so the particle system could glow blue as you walk).

    To Create A Costume
    1- Create your avatar as a normal gameobject with whatever elements you want, if it has a animator on it, you should uncheck "Apply Root Motion". This generally is just the FBX you imported.

    On the original FBX, if your object is humanoid and you want it to be compatible with existing animations (including custom animations). Under the 'Rig' tab on the Model Importer in the Inspector, select 'Humanoid'. You may need/want to configure this.

    If you can't untick 'Apply Root Motion' (it is greyed out), drag it into your scene, then drag it back into the project view to convert it from a 'Model Prefab' to a plain 'Prefab'.

    2. Create a new GameObject in your scene, and attach a Clothing Item Settings component ('Make Clothing'), in the slots select every single slot - the only exception is Animator, which is optional (only tick it if you're including an animator as well)

    Under 'Extended Settings' (a new option), there is 'Skeleton'. In the 'Root Template' drag from the Project Panel (NOT the Hierarchy) the prefab you are using for your costume into this slot.

    Tick 'Attachment' but otherwise leave everything alone. Click 'Prepare' - and save this new game object as a prefab the same as other clothing items.

    See mine here:

    If your object does not require a animator, you can upload this. To wear the costume, open your Inventory (not the outfit window - at least not until we've got a new viewer out), and click on the Costume and select 'Wear'. To unequip, simply wear something else.

    To Create A Animator
    Animators are the second part - this allows you to upload completely custom animations; including as part of another clothing item (e.g. a Beer jug that makes you swerve drunkenly is possible).

    Animators need a controller - to do that, create a new Animator Controller in Unity, and begin laying it out. This is a complex topic, but you can use our own editor pack controller (a smaller version of the full thing) as a template. Search for 'PlayerController' in the editor pack project panel.

    A animator controller transitions animations based on input variables - we let you insert a few variables in here (we may add more over time). Your animator needs to have all these variables listed - even if it doesn't use them.

    See example:

    These variables are:
    Magnitude: runs from 0.0 to 1.0 - 0.0 is standing still, 0.5 is walking, 1.0 is running (approximately. These values may deviate from these general bounds.)
    Angle: Runs from -1.0 to 1.0, 0.0 is not turning. -1.0 is turning left, 1.0 is turning right.
    Vertical: The users key input - moving forward/back shifts this value from -1.0 to 1.0
    Horizontal: As per above, except for the left/right keys.
    Fly Vertical: 0.0 is not moving up/down in flight, -1 is descending, 1.0 is ascending.
    Floor Angle: The normal angle of the floor - used for angling feet to match angled surfaces. Currently disabled.
    Is Falling: On/Off - is the user in a falling state
    Is Jump: On/Off - is the user currently jumping
    Is Flying: On/Off - is the user currently flying

    AnimController1.jpg AnimController2.jpg

    Once you have built your animator, drag it into the clothing item under the Extended Settings, 'Custom Animation' area on the Clothing Item settings inspector. You need to insert the names you used for the variables into the various fields. These are case and syntax sensitive (i.e. you should copy them exactly.)

    We will prepare some better documentation & some videos on these new tools shortly. To view these, you need to be using the same viewer that was released with EP7 - earlier viewers will not display either Costumes or Animators.

    Last edited by a moderator: Oct 21, 2016
    ghaelen and ZareShadows like this.
  2. Allen

    By:AllenOct 8, 2016
    Staff Member Moderator

    Aug 22, 2014
    Likes Received:
    great ;)