Home › Forums › Programming › mouse/keyboard focus problem
- This topic has 11 replies, 2 voices, and was last updated 5 years, 10 months ago by Yuri Kovelenov.
-
AuthorPosts
-
2018-12-19 at 10:14 pm #10055garyCustomer
In my app I have a UI loaded in index.html. My Verge3D app is loaded into this via iframe. Is this the right way to do it so I can use keyboard navigation to move the camera and be able to use my html UI? At the moment whenever I click on a ui element keyboard navigation stops working.
in my app.js…
function prepareExternalInterface(app) { app.ExternalInterface.reFocus = function() { document.getElementById('i3d').focus(); console.log('Firing reFocus'); } }
And in several puzzles, like enter/exit fullscreen, I’m calling my reFocus function in an attempt to restore focus for keyboard navigation.
…of course, if somebody has a decent FPS setup, I’m all ears!
2018-12-20 at 2:00 pm #10090Yuri KovelenovStaffHi,
This is interesting question, because our Farmer’s Journey game also works inside an iframe, is keyboard controlled yet it does not manifest any issues like that, for example, after clicking the fullscreen button and returning from fullscreen mode.
We use the following puzzles setup for keyboard controls:
Can you try to compare your setup with ours and find out if there is any difference?Attachments:
You must be logged in to view attached files.2018-12-20 at 5:28 pm #10095garyCustomerMy setup is a bit different now. I’m trying to have two camera modes: 1) orbit/overview of scene, and 2) Explore scene (fly camera, no movement). When exploring the scene the user should be able to click objects to animate as well as tween camera between points of interest but it’s not working.
When switching camera to 2) Explore, objects do not react to click events — no animation or camera tweening. It seems to be a limitation of camera style as only Camera: Orbit allows click events.
I’ve attached a test demonstration created using Verge3D 2.9.2 and Blender 2.8.
2018-12-20 at 8:26 pm #10101garyCustomerIs there a hack I can use to allow Flying and No Controls camera types to allow mouseclicks to objects in the scene?
2018-12-21 at 12:45 pm #10110Yuri KovelenovStaff2019-01-03 at 9:47 pm #10320garyCustomerHappy New Year, fellas! Any news about this investigation?
2019-01-04 at 7:19 am #10321Yuri KovelenovStaff2019-01-04 at 3:50 pm #10330garyCustomerSounds good, thanks for the update Yuri!
2019-01-09 at 4:23 pm #10459Yuri KovelenovStaff2019-01-09 at 4:59 pm #10460garyCustomerPerfect, thanks Yuri!
2019-01-18 at 6:32 pm #10706garyCustomerI just tested 2.10 pre3. Works as expected — thanks!
2019-01-19 at 8:32 am #10710Yuri KovelenovStaff -
AuthorPosts
- You must be logged in to reply to this topic.