You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers. No questions about C++ programming or topics which are answered in the tutorials!
I am currently working on a Windows client for my "Sky of Verdun" webbrowser multiplayer game (see http://irrlicht.sourceforge.net/forum/v ... =3&t=48781). I also want to include support for the Oculus Rift (a developer kit of which I have ), but I have a problem. This is a video of the game in Rift mode:
The rendering is done with modified code from this example: http://irrlicht.sourceforge.net/forum/v ... &hilit=hmd. The logic of the game is running on a NodeJS server, communication is done using websockets. The messages of the websockets are processed before the scene is rendered, it's running single-threaded (so no change messaged can be received during rendering of the eyes). As a workaround I have added another "dummy" camera that looks into the void and is rendered before anything else is rendered, but that approach reduces the framerate (and is not elegant). Does anyone have an idea what the problem could be? Thanks.
I encountered similar issues with Gekkeiju when doing the Oculus integration. Not really sure what eventually fixed it but I ended up with a lot of spaghetti code anyways.
Are you attaching the camera to the plane? It's probably somehow related to updating of the absolute positions of either the camera or the plane... basically it gets correctly updated during the first drawAll-call which is why the problem only appears with the first eye.
Well, I did already have the same problem when I added the cockpit view. I just copied some code from the external view (which worked) and it was fixed, but I got no idea why. I thought it was because the position of the camera calculations was moved before the beginScene call, but that was not the solution
OK, now I found a workaround I can live with. Instead of rendering the whole scene I call "OnAnimate" of the plane node. Got no idea why it works now (I don't have animators attached to the node), but it does.
Brainsaw wrote:OK, now I found a workaround I can live with. Instead of rendering the whole scene I call "OnAnimate" of the plane node. Got no idea why it works now (I don't have animators attached to the node), but it does.
Ah, that's what I'm also doing.
The OnAnimate probably updates the absolute position of the node. I haven't tried but a simple call to updateAbsolutePosition() might also do the trick
That was my first idea, updateAbsolutePosition didn't help. But now it's working. I'm currently downsizing a video of a test play using the Rift, I'll post it in the video thread in the graphics forum later on