SmartlyDressedGames / Unturned-3.x-Community

Community portion of the Unturned-3.x repo. If you have access to the source code you can find it here:
https://github.com/SmartlyDressedGames/Unturned-3.x/
84 stars 18 forks source link

Modded animal problem #2686

Closed DerpyHoowes closed 3 years ago

DerpyHoowes commented 3 years ago

So I made a custom animal and its just broken in a weird way. I have no idea. what could be causing this problem or how to fix it.

https://user-images.githubusercontent.com/59206749/124368308-b1a4a900-dc68-11eb-9929-79e3da7cffc7.mp4

DerpyHoowes commented 3 years ago

Also here's the log Client.log

DiFFoZ commented 3 years ago

Well, it could be many reasons why it doesn't work.

1.Character gameobject doesn't have an Animator component, or is not created;

  1. Maybe you forgot to add CharacterController to your animal prefab

I would also recommend to you using the argument parameter on startup: -ValidateAssets, so it will validate all assets.

DerpyHoowes commented 3 years ago

I have the animation component attached to it and I have the character controller attached only to the AnimalDedicated prefab, just like the original Nelson's example animal had. AnimalServer and AnimalClient in the example folder didnt have CharacterController attached so I didnt attach any to my prefabs either.

SDGNelson commented 3 years ago

Sigh so many ways to break the animals. 🤦‍♂️ Sorry that it is so error-prone at the moment.

From the log it appears there was an exception initializing the animal which cascaded into many other errors e.g. related to not having a pack assigned.

Animal_Server should have a CharacterController. If Model_0 and Model_1 exist they should have some renderers.

DerpyHoowes commented 3 years ago

Thanks, it moves now. But the animations arent working for some reason, and also its kind of floating over ground. How do I put it a little lower?

Also could the animations break because I renamed some of the bones in unity? (I had to rename the body into Spine and rename some other bones in order to make them match the vanilla bone names).