William758 / ZetAspects

4 stars 1 forks source link

Mod conflict with weird behavior #9

Closed Mico27 closed 3 years ago

Mico27 commented 3 years ago

Hi Im the creator of this mod https://github.com/Mico27/RoR2-TTGL-Mod and someone found a weird bug that occur on my survivor when they pick up a N'kuhana's Retort from your mod:

image

Parts of the character (one of the characters head and hip specificaly) starts rotating when they pick up the item. I was able to reproduce it with only my mod and yours installed.

However, I cannot seem to be able to find what exactly in your code what is causing this weird behavior.

William758 commented 3 years ago

I believe this weird behavior is being caused by the base game. Whenever a CharacterModel has the N'kuhana's skin applied, it causes the models head to twitch. I'm not entirely sure how the game does this but CharacterModel.UpdatePoisonAffix uses JitterBones which should point you in the right direction.

Mico27 commented 3 years ago

Ha thank you! I looked at UpdatePoisonAffix and JitterBones in dnSpy and it is indeed what was causing that weird effect. It also made me realize that I was using the wrong skinnedMeshRenderer for the main one that the JitterBones uses.