SeeSharpist
New member
Hey guys, I've been working on a harvesting system working with UCC. I have everything working atm, but I'm having trouble with one thing.
I'd like to add a component to certain weapons that mark them as Tools able to actually harvest a node, but I'm having trouble with the attackingObject param in OnImpact. It's a standard object rather than a UnityEngine.Object and is giving me Invalid cast exceptions when trying to cast it as a GameObject so that I can look for the specific component.
Is there a better way to get access to the weapon that made contact in the Melee Weapon Impact Callback? Thanks!
I'd like to add a component to certain weapons that mark them as Tools able to actually harvest a node, but I'm having trouble with the attackingObject param in OnImpact. It's a standard object rather than a UnityEngine.Object and is giving me Invalid cast exceptions when trying to cast it as a GameObject so that I can look for the specific component.
Is there a better way to get access to the weapon that made contact in the Melee Weapon Impact Callback? Thanks!