====== The role and usage of SubItem GroupID ====== A SubItem has GroupID setting. {{ vci:sdk:groupid_1.png?nolink&530 |}} NOTE: For details on VCI SubItem component, refer to [[en:vci:component:sdk:subitem| VCI VCI SubItem Component (VCISDK)]]. The GroupID is enabled in a VCI with multiple SubItems when **the value is set to other than 0**. When a SubItem with a GroupID other than 0 is grabbed and the ownership is transferred, **SubItems with the same GroupID will also have their ownership transferred**. The default value is GroupID=0, which disables this grouping function. {{ :en:vci:sdk:subitem:groupid_2_en.png?direct |}} ===== What is this for? ===== The GroupID is used when a VCI has multiple SubItems and you want them to physically interact with each other. {{ :en:vci:sdk:subitem:groupid_3_en.png?direct |}} As shown on the figure above, in the world of user B, **the physics is just copied from the calculation result on the world of user A**, therefore the ball does not move.\\ The stick that moved in the world of user A will cause the ball to move and the result of that calculation is copied to the world of user B, which causes a delay. {{ :en:vci:sdk:subitem:groupid_4_en.png?direct |}} By hitting the ball (owned by B) with the stick (owned by B), as shown in the figure above, the physics behave correctly.\\ To recap, **GroupID is used for transferring ownership of SubItems that are grouped with a SubItem that is grabbed by a user**. ===== Use cases ===== * Billiard. When you grab a cue, the ownership of balls also moves to you. * Objects connected with Joints. When you grab a part of it, the ownership of all SubItems will be transferred to you