houseki icon indicating copy to clipboard operation
houseki copied to clipboard

Mobile player controls

Open kayhhh opened this issue 1 year ago • 0 comments

Moving the camera around seems to work fine already on mobile, but there needs to be a way to move the player around, probably with a joystick on the left side of the screen, with the right side of the screen for rotating the camera.

Main question here is how to display this joystick. We could use a secondary, "UI" canvas and draw it in a 2D webgl context, but this seems annoying. I think the best approach would be rendering a UI layer after the 3D render, using an orthographic camera in Threejs. Things can be formalized into an actual UI render pass at some point if needed, but for now can keep it simple.

Requirements

  • [ ] Move player around with joystick
    • Joystick on left half of screen, rotate camera with right half
  • [ ] Rotate camera around while moving
  • [ ] Ability to switch between third and first person
    • I guess just zooming in and out like with desktop controls?
  • [ ] Ability to jump
    • Button in the bottom right of screen seems reasonable for UI
    • Should probably only be an examples thing, leaving UI up to the user of the library

kayhhh avatar Jul 30 '23 01:07 kayhhh