am new to webvr and need a little bit of help, so i built a virtual reality room, with little interior details, now i want a user to only move to specific points, for example say a user hovers over a window, than a the camera/view should jump to that window/point not necessary viewing outside just a little bit, this is to avoid users going through walls and objects. So how can one solve this? Thanks in advance.
Managed to get it right, thanks to JavaScript, so the camera now change position to that specific point you point on with cursor and than rotates.function windowCameraChange(){var curt = document.getElementById("MainCamera");curt.setAttribute('camera', 'zoom', '1.450');curt.setAttribute('rotation','0 -90 0');}
Related
I'm trying to make a FPS game using babylon.js as a framework. I want the player to be able to see an outline of their allies through walls (so they can know where they are and what they are doing). As a reference, here is an example I found on google from the game Paladins:
The best thing I could find on the babylon.js website (and on google) is how to do the outline:
(https://doc.babylonjs.com/how_to/highlight_layer)
var hl = new BABYLON.HighlightLayer("hl1", scene);
hl.addMesh(sphere, BABYLON.Color3.Green());
While an effect like this is pretty much what I want, it isn't visible though walls. Is anything like this possible in babylon.js? Thanks in advance!
To render something "on top" of something else you can use rendering groups.
The short documentation can be found here - https://doc.babylonjs.com/resources/transparency_and_how_meshes_are_rendered#rendering-groups , but the basic concept is - the higher the rendering group, the later it renders.
You can see it here in action - https://www.babylonjs-playground.com/#2338DN#3
There was an active conversation about the same subject in the forum, which can be found here - https://forum.babylonjs.com/t/highlight-through-objects/8002/3 , credit goes to sebvan
Currently I'm trying to implement a way that the user can quickly switch to a room that displays the instructions/controls. Once they're done reading them, they should be able to return to the room they were previously in in the state that they left it. What currently happens when I return to the room is that it has be reset to how it started.
I'm not calling anything like room_restart() or game_restart(), I'm just using room_goto(num) to navigate between the game room and the instructions room.
An easy way around would be to mark your room as persistent (room_persistent = true) before transitioning to instructions room and unmark it after transitioning back.
A more proper way would be to not transition the room at all, instead deactivating the game objects (instance_deactivate_all(true)) and then activating them again (instance_activate_all()) - just like you would for showing a pause menu.
I have done this a lot in my games. All you need to do is save the current game state, then switch to a room with the controls. Use - game_save("example.dat") then open it when you want to return. There are many tutorials on game saving and loading!
game_save("level.dat")
room_goto(rm_controls)
then
game_load("level.dat")
Hope that helps!
I'm not sure what's wrong, but after setting up the map, all I get is a light blue screen. Changing schemes seems to not affect it either. Neither does changing the geoCenter (currently testing with: 37.73088189776775 -122.14045649405767) which is in the SF bay area.
Also, when I check usage on the project via my account, it is 0 despite me testing all day.
My delegate is called when I try to scroll the map, so I know that part is hooked up and I'm actually rendering the map. It's just a light blue screen...like I'm stuck in the ocean...
Any ideas? Any low hanging fruit I can check? Thanks.
Update: I'm using the iOS Starter SDK. Please let me know what additional information would help. Thanks.
I was able to get it working by not embedding the map inside another view. By bringing it to the top level, and then subclassing it I was able to get it to work. Thanks.
I'm having problems making FullCalendar fully accessible. I'm using the default month view and can't access the next, previous, and today buttons on the top right without using a mouse. If I run a screen reader, I can access those buttons but not without running the screen reader.
And on another note, I currently am using tool tips that pop up when you mouse over an event title to display more information. If anyone has any tips on how to make those accessible to a screen reader or accessible without a mouse, I'd greatly appreciate it!
Regarding the buttons, I would advice that you write new buttons if accessibility is important. These buttons you could then hook up to your own javascript functions that moves to previous and next.
Check out this documentation example
Regarding the second problem, I think that's the same problem not just for physically impaired but also for things like mobile browsers. My tip would be to avoid onmouseover if the information that appears is really important.
I'm not having an easy time making a workable mouse pointer interface on the Kindle with Qt (unofficial, of course). The fiveway joystick can't track more than one direction at a time (no diagonal moves), and the screen is too slow to update for good feedback.
I've got limited acceleration, but with the screen delay it's very frustrating to use. When you release the fiveway, the mouse will keep moving for 1-2 seconds... and it's not always a constant delay.
Given these limitations, I really need help from the application side. I need a method the mouse driver plugin could use to identify what the acceleration profile should be... so it can say slow down as it crosses a button. The app could help define regions where different acceleration made sense (start with single pixel shifts in a drawing area, but start at 10 or so for dialog dead space). More simply, the application should be able to tell the mouse pointer to transition from cursor to keypad mode, etc.
However, I can enumerate the mouse drivers, but I don't seem to get driver names. They're not QObjects, so there's no qobject_cast. How can I identify them as mine, and safe to cast to? I can force a cast, but that seems pretty lame.
Do I just assume the plugins are mine and cast them?
I'd like some simple signal/slot way to wire this up.
UPDATE
Maybe the plugins can notify the app somehow. Maybe using QApplication::topLevelWidgets(), trying qobject_cast looking for the QMainWindow... then sending it a custom signal with the plugin's internal QObject-based signal handler class? Then the app could turn around and set up the connections it actually wanted to deal with. I'll try it tonight or tomorrow.
Why don't you implement right as "tab" and left as "shift+tab". That way, you can move the focus around. Now, just center the pointer over the active area of the widget with focus (think checkboxes, they need the pointer over the box, not the center). I expect the user to be more interested in this and actually having a pointer to mover around in an environment where it is down right impossbile to use.