app
app copied to clipboard
Issues with switched NPC( 'g' key)
while we press 'G' key and switch to the nearest NPC, I noticed following issues:
1- "E" activator keeps appearing over the npc, while we switch to it.
https://user-images.githubusercontent.com/35926530/181524059-7faf0dfe-f149-4e68-99da-e4274c3296b4.mp4
2-The jump animation of switched npc is too fast.
https://user-images.githubusercontent.com/35926530/181524248-56d890e5-38d9-41af-bcc1-7bd4f96796e7.mp4
3-While we press "E" on the switched NPC, it restricts the movement of npc inside a kind of loop around the avatar.
https://user-images.githubusercontent.com/35926530/181524680-aee55c9a-835a-4688-9b9b-28eb6f376b06.mp4
4-While we switch to npc from avatar, the avatar is left just in the state it was switched from.
https://user-images.githubusercontent.com/35926530/181525036-60f806e2-1289-4712-bde9-27ec00aab496.mp4
I think the bug is that avatar updates for switched-to NPCs are run twice.
Solution
- When npc joins the party, it should be moved to avatar's app manager from scene app manager.
- Physics tracker needs to track all app manager including scene and avatar's. Actually, manager for physics tracking is preferable ==> https://github.com/webaverse/app/issues/3614
Avatar Switching (G)
- You can only switch to avatar who already joined the party, not from npcs from the world.
Party System
Related Pull Requests
- https://github.com/webaverse/app/pull/3625
- https://github.com/webaverse/totum/pull/130
Video
- https://www.loom.com/share/544739b353b540fc86cd38197d491833
Notes
- Fixed of all 4 bugs
- Party is up to 3 members, including the main character. When player activates the npc, it joins party.
- Party members follows a main character in a line, instead of all members heading to main character at the same time.
- Default avatar can't be removed from party.
- Only npcs can be invited to and removed from the party.
- We have fixed npc pool, and main avatar will not be added into npc pool.
Update
- Added party manager which changes the actions and collects the members
- Added action api to party manager. Supported features are
switchcharacter,addplayerandremoveplayer. - Player class should have no idea about parties
- Added action api to party manager. Supported features are
- Removed dependency to avatar app on party manager
Test cases
- Open a scene, with at least 2 npcs.
- Activate one npc. See if it follows player.
- Deactivate the following character. See if it stops following.
- Activate another npc.
- Press
Gto swap to new character. - Check if new character can interact with other character and npc.
- Activate another remaining npc.
- Run the player and see if all characters are following in a line.
- Keep switching characters.
- Do jump and switch to another character instantly. All characters should move smoothly.