FPS camera using keys only
-
- Posts: 26
- Joined: Wed Jan 26, 2011 12:13 am
FPS camera using keys only
I am making a 3D editor for a game I'm making. I want to use an fps camera, but it uses the mouse, which I need for the editor. I want to use the numpad instead.
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Re: FPS camera using keys only
Take a look at the CSceneNodeAnimatorCameraFPS.cpp file, it contains the animator used for the FPS camerahungryninja wrote:I am making a 3D editor for a game I'm making. I want to use an fps camera, but it uses the mouse, which I need for the editor. I want to use the numpad instead.
You can then build your own animator with numpad controls based on the implementation in that file
make 2 cameras,
a fixed camera and a FPS camera;
switch from one to the other with Mouse_Right or a key;
here is an example where is used SPACE to commute between the 2 cameras; (edit mode and menu mode);
http://www.filefactory.com/file/ca16d77 ... latGUI.rar
a fixed camera and a FPS camera;
switch from one to the other with Mouse_Right or a key;
here is an example where is used SPACE to commute between the 2 cameras; (edit mode and menu mode);
http://www.filefactory.com/file/ca16d77 ... latGUI.rar
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Why would you want to use 2 cameras when you can easily achieve this with just 1 camera? From what I make up from it hungryninja just wants to rotate the camera with the numpad instead of the mousenespa wrote:make 2 cameras,
a fixed camera and a FPS camera;
switch from one to the other with Mouse_Right or a key;
here is an example where is used SPACE to commute between the 2 cameras; (edit mode and menu mode);
http://www.filefactory.com/file/ca16d77 ... latGUI.rar
Irrlicht's scenenode system was designed to be easily manipulated by animators, why not use that system then?
nahhnespa wrote:make 2 cameras,
a fixed camera and a FPS camera;
switch from one to the other with Mouse_Right or a key;
here is an example where is used SPACE to commute between the 2 cameras; (edit mode and menu mode);
http://www.filefactory.com/file/ca16d77 ... latGUI.rar
if you want to go with switching by pressing space simply enable/disable the inputs for the fps camera !!!
Code: Select all
irr::scene::ICameraSceneNode::setInputReceiverEnabled( bool enabled )
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java