HeroEditorHub
HeroEditorHub copied to clipboard
PrimaryMeleeWeapon getting switched from right hand to left hand somewhere and then not equipping because there is a shield in left hand
https://user-images.githubusercontent.com/10817275/233792540-094a94e4-2455-4e49-a58e-08cafed796d7.mp4
See video. PrimaryMeleeWeapon is set to right hand in the prefab, but somewhere along the line, it is getting changed to left hand instead of right hand.
To get around this for now, I put in a hack in CharacterSetup.cs Equip method to force the primary melee weapon renderer to be the right hand:
PrimaryMeleeWeaponRenderer = BodyRenderers.FirstOrDefault(i => i.name == "ArmR[1]").transform.FindDeepChild("MeleeWeapon").GetComponent<SpriteRenderer>();
It seems to work well.
Hello! Can you reproduce this with the hero editor scene? I can't know how your code works exactly.