com.unity.multiplayer.samples.coop icon indicating copy to clipboard operation
com.unity.multiplayer.samples.coop copied to clipboard

feat: NetworkObject parenting, PickUp Action

Open fernando-cortez opened this issue 4 years ago • 10 comments

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.

fernando-cortez avatar Sep 29 '21 18:09 fernando-cortez

I've put this on hold for now and added something on our calendars to come back to this.

SamuelBellomo avatar Oct 21 '21 20:10 SamuelBellomo

After coming back to this, we'll need a refactor to our player structure before this gets in

SamuelBellomo avatar Nov 02 '21 19:11 SamuelBellomo

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 avatar Jan 04 '22 15:01 fernando-cortez

@fernando-cortez looking at attached tickets, looks like this could be looked at again? wanna remove the on-hold label?

SamuelBellomo avatar Apr 12 '22 22:04 SamuelBellomo

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

SamuelBellomo avatar May 12 '22 19:05 SamuelBellomo

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?) image

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.

fernando-cortez avatar May 19 '22 13:05 fernando-cortez

Placing On Hold until this lands in Netcode.

fernando-cortez avatar Jun 01 '22 19:06 fernando-cortez

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 avatar Jul 08 '22 14:07 fernando-cortez

@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 avatar Jul 08 '22 19:07 SamuelBellomo

@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.

fernando-cortez avatar Jul 08 '22 20:07 fernando-cortez