Search found 15 matches

by porki
Tue Jun 12, 2007 1:05 pm
Forum: Beginners Help
Topic: camera behind the vehicle
Replies: 2
Views: 250

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....
by porki
Sun Jun 10, 2007 12:36 pm
Forum: Beginners Help
Topic: driving a car:)
Replies: 11
Views: 702

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...
by porki
Sun Jun 10, 2007 12:13 pm
Forum: Beginners Help
Topic: driving a car:)
Replies: 11
Views: 702

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...
by porki
Sun Jun 10, 2007 11:28 am
Forum: Beginners Help
Topic: driving a car:)
Replies: 11
Views: 702

I managed to move my car but it doesn't stop after releasing W button, it goes constantly. What should I do to force it to move constantly bt only when button is pressed and held
by porki
Sun Jun 10, 2007 12:45 am
Forum: Beginners Help
Topic: driving a car:)
Replies: 11
Views: 702

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...
by porki
Sun Jun 10, 2007 12:10 am
Forum: Beginners Help
Topic: driving a car:)
Replies: 11
Views: 702

I'm thankful:) I'll check it out and tell you!
by porki
Sat Jun 09, 2007 9:12 pm
Forum: Beginners Help
Topic: driving a car:)
Replies: 11
Views: 702

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...
by porki
Sat Jun 09, 2007 4:08 pm
Forum: Beginners Help
Topic: moving vehicle
Replies: 10
Views: 581

ok, that works. Yes, it was a double declaration, I don't know why I didn't catch that
Thank you!
by porki
Sat Jun 09, 2007 3:47 pm
Forum: Beginners Help
Topic: moving vehicle
Replies: 10
Views: 581

These line are in my code, so something is still wrong video::E_DRIVER_TYPE driverType = video::EDT_DIRECT3D9; printf("Please select the driver you want for this example:\n"\ " (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\ " (d) Software Renderer\n (e) Burning's ...
by porki
Sat Jun 09, 2007 3:45 pm
Forum: Beginners Help
Topic: moving vehicle
Replies: 10
Views: 581

IrrlichtDevice* device = createDevice( driverType, core::dimension2d<s32>(640, 480),16, false, false, false, &receiver);

Still nothing:/
by porki
Sat Jun 09, 2007 3:35 pm
Forum: Beginners Help
Topic: moving vehicle
Replies: 10
Views: 581

Here is code. Watch out node and node1:) #include <irrlicht.h> #include <iostream> using namespace irr; #pragma comment(lib, "Irrlicht.lib") scene::IAnimatedMesh* mesh = 0; scene::IAnimatedMeshSceneNode* node1 = 0; scene::ISceneNode* node = 0; IrrlichtDevice* device = 0; class MyEventRecei...
by porki
Sat Jun 09, 2007 3:19 pm
Forum: Beginners Help
Topic: moving vehicle
Replies: 10
Views: 581

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...
by porki
Sat Jun 09, 2007 12:07 pm
Forum: Beginners Help
Topic: subwindows
Replies: 0
Views: 114

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...
by porki
Fri Jun 08, 2007 3:30 pm
Forum: Beginners Help
Topic: animating model from 3ds max
Replies: 3
Views: 185

but it isn't animated and I can load it in this code: int main() { IrrlichtDevice *device = createDevice( video::EDT_OPENGL, dimension2d<s32>(900, 700), 16,false, false, false, 0); device->setWindowCaption(L"Przyklad dzialania Irrlichta "); IVideoDriver* driver = device->getVideoDriver(); ...
by porki
Fri Jun 08, 2007 2:24 pm
Forum: Beginners Help
Topic: animating model from 3ds max
Replies: 3
Views: 185

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...