Splitscreen

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
mkeller
Posts: 2
Joined: Wed Apr 25, 2007 3:17 am
Location: Wisconsin, USA

Splitscreen

Post by mkeller »

I am relatively new to Irrlicht, and to C++, so please bear with me if I sound dumb. :D

I have been playing around with the splitscreen tutorial that's on the main website, and have started making a simple VR program for a friend of mine who's into electronics, and wants to make his own headset and sensors. For now, at least, my program is basically the normal terrain example, with a FPS camera with gravity and a collision ellipse attached. Because it is supposed to be stereoscopic, I have another normal camera as a child to the first camera right next to it, and have the two set up to display side by side, the way they showed on the splitscreen example, like a couple of eyes. And here's where the problems begin . . .

For one thing, while I'm holding down the up arrow, to move forward, I can defy gravity. When I let go if it, the cameras fall back to earth, but as long as I'm holding down the button, I can fly as high as I want. This is not supposed to happen! Before I added the second camera, it worked all right, but now that it's splitscreen, gravity only works when no keys are pressed. Any idea why?

Also, while the uncontrolled camera follows the FPS camera's movement, it doesn't follow its rotation. This seems odd, considering that they say in the Irrlicht help file that you can use parenting to realistically simulate "an animated character on a moving platform on a moving ship." But if the ship turns, the guy and his little platform wouldn't, if this is the way parenting usually works. Right now, if I move my mouse before walking forward, the two cameras end up crosseyed, or pointing in different directions. Is that a bug in the engine, or am I doing something wrong?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You should notice that the camera lookat target changes do not change the rotation. So if you bind a child node to a camera it will follow the rotation of the camera, but not the lookat-changes. Your camera will probably not do any rotation, thus childs don't rotate, either. This has to be fixed in your code.
In which way did you integrate the gravity? Maybe you're overwriting the camera position after gravity was applied du to your key reactions?
CodyCer0
Posts: 41
Joined: Mon Dec 08, 2008 3:07 am

Post by CodyCer0 »

I know its an old topic, but I got the exact same problem now that I put in split screen to collision example.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

When using Irrlicht 1.5 you can simply bind the rotation to the target. Done.
Post Reply