Hello guys, i have been trying to set the rotation for my combatant prefab view. The issue is that the prefab view portrait only shows the back of the combatant. I have tried setting the rotation on the y-axis of the rotation of the prefab view of the combatant portrait setting, but is not working(the rotation is never applied when the prefab is spawned). Any idea on how to fix this.
Please on a side note, how do i check the weapon a combatant is equipped with via code
You can access the equipment on a combatant like this:
combatant.Equipment[partID].Equipment
partID is the ID/index of the equipment part, Equipment gives you access to the equipped EquipShortcut class, which can be null (unequipped), a weapon or an armor.
E.g. checking for a specific weapon:
if(combatant.Equipment[partID].Equipment != null &&
combatant.Equipment[partID].Equipment.IsType(EquipSet.Weapon) &&
combatant.Equipment[partID].Equipment.ID == index)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
It's working on my end and the prefab is rotated as defined by the portrait's settings.
Maybe there is some component attached to the prefab that's causing that? E.g. a player controller or something like that.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!