Unturned's Player Rig

Hey there, I’ve been working on a few mesh replacement objects and have been thinking about how exactly the player rig works, and wanted to know if anyone had more information on it. These are all questions I’ve had for a while and haven’t been able to figure out.

  1. In the Kuwait map there are two cats that seem to be able to move their head and look at the player, despite obviously not sharing the same rig as the player does. How is this done? I assume the “Skull” bone is just weighted to the cat’s head and the rest of the other bones have no weights, is that correct?

  2. Is it possible to replace animations for a completely separate rig? For example if I wanted the player to be able to play as a pig, would it be possible to have different animations play for walking, running, attacking, etc, or are the player animations baked into the game as the only possible animations for these actions?

  3. With regards to mesh replacement specifically, I’ve noticed that a lot of inanimate objects that I have mesh replacements for (I wanted objects that have the same level of interactability that NPCs have), will contort and attempt to animate using the same idle animations as NPCs, despite having no bones or rig. Does unturned automatically apply a rig to mesh replaced NPCs? If so, would just adding a rig with no weights prevent this attempt to animate the model?

As far as I know, you are correct regarding the “Skull” bone. You can replace the animations and you need to ensure that the new animations are compatible with the actions defined in the game. If Unturned recognizes a mesh as an NPC it may try to apply default animations to it. By creating a rig with bones but not assigning any weights to them I think you can stop the mesh from animating.

1 Like

I’ve tried this and it seems to just not animate properly. I assumed that giving the model one skull bone and then weighing it to parts of the mesh would cause the model to turn towards the player the same way an NPC’s head does, but it doesn’t seem to be working that way.