Hi guys,
I need a FPS style camera for our school project. I tried implementing my own, but then I didn't get any mouse input. How can I get mouse and keyboard input to my camera?
And how to best implement jumping and crouching?
Create custom FPS Camera
Have you tried searching the forums? Also some of your own code would be good to share to better see where you are going wrong, I doubt many people are in the business of doing school homework for others.
Here are some search results to get you started:
For jumping:
http://irrlicht.sourceforge.net/phpBB2/ ... 0AND%20FPS
For your input problem you may want to check that you are setting up the eventreceiver correctly.
http://irrlicht.sourceforge.net/phpBB2/ ... ntreceiver
Here are some search results to get you started:
For jumping:
http://irrlicht.sourceforge.net/phpBB2/ ... 0AND%20FPS
For your input problem you may want to check that you are setting up the eventreceiver correctly.
http://irrlicht.sourceforge.net/phpBB2/ ... ntreceiver
-
- Posts: 4
- Joined: Sat Dec 22, 2007 5:42 pm
Use the built in FPS camera camera and use it with MastEventReceiver.
Solve the non responding camera inputs by this: http://irrlicht.sourceforge.net/phpBB2/ ... ntreceiver
Solve the non responding camera inputs by this: http://irrlicht.sourceforge.net/phpBB2/ ... ntreceiver
-
- Posts: 4
- Joined: Sat Dec 22, 2007 5:42 pm
I do not _want_ to write my own camera. But I believe this is the best/only way to do this, as I'm integrating the Wii Remote and thus I need to be able to have control on how the camera reacts on mouse movement. And I want to be able to lean to a side, using the angel from the nunchuk.MasterGod wrote:I think he wants to create his own camera..
Apparently the event receiver of the camera is working. But, as I copied the code from the addCameraSceneNodeFPS() from CSceneManager, the OnAnimate doesn't ge called. Maybe I should move all positioning stuff from this onAnimate() to my event handler. But I wanted to stay as close to the original camera.
[edit]I fixed by manually calling camera->OnAnimate(). So now I have my camera working.[/edit]