VictorF

Issue with iPhone and registerBeforeRender

Recommended Posts

I need to make custom operations before or after the render and it works nicely on Chrome and Firefox (tested in windows), also works nice on Android but you cannot move the camera in iPhone

here are the mandatory examples

Non-working https://www.babylonjs-playground.com/#7FJNSA

Working (just commented out the registerBeroreRender) https://www.babylonjs-playground.com/#7FJNSA#1

 

Any tip on this? Thank you in advance.

 

Btw: most of my code is based on an example that a user posted in the forum but I cannot longer find the post to make a proper attribution sorry!

Share this post


Link to post
Share on other sites
42 minutes ago, trevordev said:

@VictorF Could you try using scene.onBeforeRenderObservable.add(your function) and scene.onAfterRenderObservable.add(your function) instead and see if that works?

Weird it works on https://www.babylonjs-playground.com/#7FJNSA#3 but not in my own example anyway something is weird there since registerBeroreRender is not working even in the simplier case.

Share this post


Link to post
Share on other sites

This is totally weird... this one works

https://www.babylonjs-playground.com/#7FJNSA#3

and this other doesn't work 

http://www.motivacg.com/temporal/victor/LayamaStupidTestV3/rawplayground/

But the second one is just the first one downloaded and copied to my server thats all, also it works ok in PC and Android devices but cannot be used in iPhone devices

Share this post


Link to post
Share on other sites
6 hours ago, max123 said:

Try adding this to your code:


canvas.setAttribute("touch-action", "none");

it worked I cannot imagine why this works but <canvas id="renderCanvas" touch-action = "none"></canvas> does not.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.