decentraland / creator-hub

MIT License
0 stars 4 forks source link

Remove "pointer lock" from the scene code #158

Open menduz opened 1 year ago

menduz commented 1 year ago

The scene should be able to remove the PointerLock in situations like "opening a popup in the UI for trade".

To do so, we will follow the ECS approach and perform that operation via component.

The CameraMode component will receive a new property pointer_locked

message PBCameraMode {
  common.CameraType mode = 1;
+ bool pointer_locked = 2;
}

Both the scene and the renderer can set pointer_locked to false at any moment. Only the user can set pointer_locked to true as a result of a HID interaction.

Tasks to perform: