I have a sketch with a rotating cube that uses the orbitControl() to allow it to be moved on its X axis, however, orbit controls only work if I double tap the screen.
As far as I’m aware this is not expected behaviour for orbitControl() and it should work as soon as I first touch the screen. There are no errors in my console and everything with my sketch works fine.
but I’m confused that the orbit control doesn’t run completely in my example (on iOS, old SE). Nevertheless, the example on the reference page seems to work, but as you mentioned I need to tap it once
Hi, thanks for your reply - I will in future post an example sketch to illustrate the issue as you suggest.
In terms of the examples that you have shared, with your own sketch orbitControl doesn’t work at all on iPhone8 iOS14 Safari and will only initiate after a tap on Android 10 Chrome v90.
The p5.js reference sketch works on both the above devices but requires a tap to initiate orbitControl which I don’t believe is the expected behaviour.
I can only say that webgl on p5.js is still under development and “not the expected behavior” is not surprising to me. Unless someone else here can help you, I suggest opening an issue on github which perhaps is a better way to move the discussion forward as I’m no familiar with the code base of webgl.
The other thing is that I usually don’t recommend to use p5.js for production use - not saying that p5.js is not good, but it’s not made for production and I see these issues occur once in a while (plus not to mention performance issues). For 3D, three.js and a-frame are always good options
Thanks for your feedback, it’s much appreciated. I’ll open an issue on Github as you’ve suggested.
It’s good to know that p5 is not necessarily recommended for production use. I have managed to achieve the desired effect using three.js so I’m not completely stuck and will migrate to that if I can’t find a solution for p5.
just to clarify - production use is usually not “supported” by any open source projects. But what I mean is the population of the users - tools like openFrameworks or this case three.js are used by quite a lot of designers/programmers who use them for production, so these tools are more polished in terms of testing on different platforms, durability etc. However, p5.js is more oriented to education and sometimes these points are missed out.