Search found 15 matches
- Tue Jun 12, 2007 1:05 pm
- Forum: Beginners Help
- Topic: camera behind the vehicle
- Replies: 2
- Views: 243
camera behind the vehicle
I want to create a camera that will follow my vehicle AND change angle if a car turns (I want this camera to be constantly behind the car). I have this fragment of code: core::vector3df s(0,-100,300); //declaration at the beginning scene::ICameraSceneNode* camera = smgr->addCameraSceneNodeFPS(0,100....
- Sun Jun 10, 2007 12:36 pm
- Forum: Beginners Help
- Topic: driving a car:)
- Replies: 11
- Views: 684
ok, that works, but what with a camera? What are the states for cursor keys? if (receiver.keyState[KEY_KEY_S])// what should be here for cursor key(up)? { moveForward(camera, 50.0f); } I can do the same thing I did with car, for example choose IKJL keys to control camera, but how can I do this to us...
- Sun Jun 10, 2007 12:13 pm
- Forum: Beginners Help
- Topic: driving a car:)
- Replies: 11
- Views: 684
Great, these lines of code and it works! keyState[event.KeyInput.Key] = true; if (event.KeyInput.PressedDown == false) { keyState[event.KeyInput.Key] = false; } But how can I get my camera control back?:)It's fps camera and after all these changes connected with EventReceiver I'm unable to control m...
- Sun Jun 10, 2007 11:28 am
- Forum: Beginners Help
- Topic: driving a car:)
- Replies: 11
- Views: 684
- Sun Jun 10, 2007 12:45 am
- Forum: Beginners Help
- Topic: driving a car:)
- Replies: 11
- Views: 684
where should I place this fragment? if (receiver.keyState[KEY_KEY_W]) { moveForward(node1, 50.0f); } After making this EventReceiver program compiles but car doesn't move at all and I lost control of my camera:) Here is all the code from my program: #include <irrlicht.h> #include <iostream> using na...
- Sun Jun 10, 2007 12:10 am
- Forum: Beginners Help
- Topic: driving a car:)
- Replies: 11
- Views: 684
- Sat Jun 09, 2007 9:12 pm
- Forum: Beginners Help
- Topic: driving a car:)
- Replies: 11
- Views: 684
driving a car:)
I have this fragment of code for my car model loaded as AnimatedMesh(node1) : class MyEventReceiver : public IEventReceiver { public: bool OnEvent(SEvent event) { if (event.EventType == irr::EET_KEY_INPUT_EVENT && !event.KeyInput.PressedDown) { switch(event.KeyInput.Key) { case KEY_KEY_W: ca...
- Sat Jun 09, 2007 4:08 pm
- Forum: Beginners Help
- Topic: moving vehicle
- Replies: 10
- Views: 565
- Sat Jun 09, 2007 3:47 pm
- Forum: Beginners Help
- Topic: moving vehicle
- Replies: 10
- Views: 565
- Sat Jun 09, 2007 3:45 pm
- Forum: Beginners Help
- Topic: moving vehicle
- Replies: 10
- Views: 565
- Sat Jun 09, 2007 3:35 pm
- Forum: Beginners Help
- Topic: moving vehicle
- Replies: 10
- Views: 565
- Sat Jun 09, 2007 3:19 pm
- Forum: Beginners Help
- Topic: moving vehicle
- Replies: 10
- Views: 565
moving vehicle
I have problem with my vehicle. I load it from 3ds file: IVideoDriver* driver = device->getVideoDriver(); ISceneManager* smgr = device->getSceneManager(); IGUIEnvironment* guienv = device->getGUIEnvironment(); IAnimatedMesh* mesh = smgr->getMesh("../../media/truck.3ds"); IAnimatedMeshScene...
- Sat Jun 09, 2007 12:07 pm
- Forum: Beginners Help
- Topic: subwindows
- Replies: 0
- Views: 112
subwindows
With this short code fragment I am able to load 3ds max model of truck with fps camera that I can rotate. int main() { device = createDevice( video::EDT_OPENGL, dimension2d<s32>(1024, 768), 16,false, false, false, 0); device->setWindowCaption(L"Przyklad dzialania Irrlichta "); IVideoDriver...
- Fri Jun 08, 2007 3:30 pm
- Forum: Beginners Help
- Topic: animating model from 3ds max
- Replies: 3
- Views: 179
- Fri Jun 08, 2007 2:24 pm
- Forum: Beginners Help
- Topic: animating model from 3ds max
- Replies: 3
- Views: 179
animating model from 3ds max
I'm trying to use tutorial about movement to use keyboard to drive a truck. Truck model is taken from 3ds max (exportet to .3ds or .obj file).But when I'm trying to put it in the code from tutorial scene::IAnimatedMeshSceneNode* anms = smgr->addAnimatedMeshSceneNode(smgr->getMesh("../../media/t...