Hubs-Foundation / hubs

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.
https://hubsfoundation.org
Mozilla Public License 2.0
2.14k stars 1.41k forks source link

addons: Physics doesn't work when in-room objects are thrown #6520

Open Exairnous opened 6 days ago

Exairnous commented 6 days ago

Description Applies to: https://github.com/Hubs-Foundation/hubs/pull/6468 Physics doesn't work when in-room objects are thrown. The objects immediately cease moving when the mouse button is released at the end of the throw instead of continuing on with the physics system. This affects both the bitECS and A-Frame loaders.

To Reproduce Steps to reproduce the behavior:

  1. Enter a Hubs room.
  2. Drag and drop a GLB file that you have locally on your computer into the room (or use Place -> Upload). This file can be downloaded and used to test if you don't have any GLBs handy: Test_Cube.zip.
  3. If you are using the A-Frame loader: 3.1 Spawn a media frame cube via the /cube chat command. 3.2 Use the media frame cube to capture the object to allow moving the object. 3.3 Move the object outside of the media frame (these substeps work around bug #6518).
  4. Throw the object by clicking and dragging on it quickly and then releasing the mouse button while the object is moving.
  5. See that the object immediately stops moving when you release the mouse button.

Expected behavior The object should continue moving in accordance with its momentum when the mouse button is released.

Hardware

Additional context Potentially caused by #6487 Originally reported (with slight differences) against the master branch here: https://github.com/Hubs-Foundation/hubs/issues/6503