feat: NetworkObject parenting, PickUp Action
Jira task here.
This PR introduces the "PickUp" ability for all players. The action is triggered through Space press, and goes through the Action system. Custom spawners spawn instances of "PickUpPot" prefab inside BossRoom scene. These spawned NetworkObject pots are targetable.
A pot is parented to the root of the PlayerAvatar GameObject, and the PositionConstraint component is used to follow the position of a hand bone.
Worth mentioning for this PR:
- Missing UX visuals. A subsequent PR will address how to trigger this Action through mouse & keyboard, or on mobile, on the game UI.
I've put this on hold for now and added something on our calendars to come back to this.
After coming back to this, we'll need a refactor to our player structure before this gets in
State of PR: awaiting fix on bug that was noticed when working on NetworkObject parenting.
Parenting should work with a hierarchy of a spawned NetworkObject containing a NetworkObject child GameObject. PR on hold until fix is in.
@fernando-cortez looking at attached tickets, looks like this could be looked at again? wanna remove the on-hold label?
Adding this for all PRs that have been opened since this new flow has been added. Please add your changelog here project changelog file and/or package changelog file
Looks like the characters carry the objects differently. The archer and rogue seem to have it be over their head, while the tank and mage have it on their right hand. It might look better with it being placed between both hands in front of the body. The way it is constrained, the pot seems to move weirdly when getting hit or when using another action while carrying it. (should actions be disabled when carrying an object?)
Also, there is a pot near the first portal that has the same model but is not interactable.
And should we do something similar to what we did with the revive action, and have a button replace the attack action when we select a pot? That would allow mobile users to use that action too
Very good points on the feel & usability of this action. I will look into a better bone solution (maybe creating a separate one on the graphics gameobjects). And of course clean up the other pots.
I will likely throw the action side of this PR first, and a subsequent one will actually add it to the main scene + address UX issues for usage.
Placing On Hold until this lands in Netcode.
Moving to On Hold until this issue is addressed SDK side.
IMO the action will feel broken if joining players don't see the hold animation on late-join. @SamuelBellomo for visibility.
@fernando-cortez what do you think about merging this on our side and bugging this so we keep track. This way that code base is now part of our dev branch, it can now be playtested and we can close that ticket, since anyway this isn't a samples issue
@SamuelBellomo: merge conflicts have been resolved. The pots haven't been added to the level. There's still an animator issue on pickup which causes the player to rotate. I think we should do the same as the NetworkRigidbody PR, where @jilfranco-unity builds on top of this PR to address those animator issues, as well as add visual improvements on pickup/drop FX.
