Making Pointer Lock Controls work with iphone/ipad

I have created a demo program that uses Pointer Lock Controls to allow unlimited mouse movement on a PC. To start the program you have to “Click to Start”.
I tried running the program on an iphone and am not sure:

  1. How to “Click to Start”?
  2. If Pointer Lock Controls even makes sense on an iphone/ipad (which already has unlimited touchscreen movement - once I add the appropriate touchscreen input)?
  3. If they are incompatible, how do I bypass PointerLockControls on an iphone/ipad?

Pointer lock is related to mouse capturing. If the device has not mouse, using PointerLockControls does not work. I suggest you detect touch devices and then setup different controls.

Thanks. I had forgotten about TouchStart.

However, now that I have inserted TouchStart, I still can’t get past the “Click to Play” screen. Apparently TouchStart is not recognized as a valid “Click to Play” input?

As I think about it, the limitation on acceptable inputs is probably imposed by the HTML/css program. I am using the version from the three.js examples - which also does not appear to accept Touchstart as a valid input.

Or, thinking about all the input changes I will have to make to create an iphone-friendly version, is it better just to create a separate program for iphone which does away with PointerLock controls and includes the required inputs to make it usable on an iphone?

Can you please suggest any other control for touch screen which needs to be same like pointerlock controls view? @Mugen87

The is no 1:1 replacement. What you are going to develop really depends on your use case. This topic might help:

Yes, it is okay. But I need to know, what control is used in this to look around in the interior in this example. This application is what my exact need. Open this
After entering into the interior view by clicking on the hotspot near door, that is not the OrbitControl right, then what control is that within interior

Why wouldn’t that be orbit controls? They work with both mouse and touchscreen.

My problem with pointer lock was that I was not able to press a key to get past the start screen. After Mugen87’s comments, I realized that I would have to be designing a whole different interface for touchscreen anyways - one that had on-screen icons that I could press in place of various key commands. By design, those inputs also accept mouse inputs.

On the example you show, they have added a clever input that appears to be attached to the door handle to let you get into the car. But once, you are seated, you should be able to use Orbit Controls to look around. Or, if you don’t like Orbit Controls, it is not that difficult to create your own input routine which should work with both mouse and touchscreen.

I hope that helps.