Page 1 of 1

I am getting quite aggravated here! [camera movement topic]

Posted: Thu Oct 04, 2007 1:01 am
by waldo
I'm trying to get normal fps-like movement (like in the collision demo) in the terrain demo. I replaced nearly all lines with the ones from demo7 (collision), but still the camera wants to walk in the direction of the camera rotation. So if I look up I don't move forward but upward. I can't seem to find the right line in the collision demo to make the movement like walking instead of flying. Is there some magic doing it's part here or...? It was the c# version I was editing...

By the way, flying style movement with gravity is one of the most stupid things I've ever seen, especially walking backwards while looking at the floor... bump, bump, bump, bump, bump, bump, bump, bump, aargh.

Posted: Thu Oct 04, 2007 1:03 am
by vitek
Collision animator applies gravity so the camera falls, but applies collisions so it doesn't fall through the ground.

Travis

Posted: Thu Oct 04, 2007 1:22 am
by waldo
True that, and I'm happy the camera doesn't fall through the ground. But that's not the problem. The problem is that the camera wants to fly and not walk. So pointing up and pressing the up-key, means the camera wants to go into the air rather than forward. In the collision demo the camera behaves just the way I want, let's say, it behaves the Unreal or Quake way. In the terrain demo it behaves more like in Descent. And I'm not planning a Descent style game... Although I have to say a Descent style game is still on my list ;)
Anyway, what can I do to make the camera in the terrain demo behave like in Quake/Collisiondemo? I can't find the magic line...

Posted: Thu Oct 04, 2007 4:56 am
by vitek
Well, I said the collision animator applies gravity. If you don't have gravity, you don't fall, right? Maybe you should have a look at the line that creates the collision response animator. It might also help if you got familliar with the parameters to that function here.

Travis

Posted: Thu Oct 04, 2007 6:17 pm
by waldo
I did my homework late night yesterday, but was too tired to post another entry. This is what I found:

C++: addCameraSceneNodeFPS(0, 100.0f, 300.0f, -1, 0, 0, true);
C# : AddCameraSceneNodeFPS(null,100,300,0);

The function is different for C++ and C#. So I guess I have to make a choice between implementing a lot of unnecessary stuff, or to get the C++ compiler to work on my pc. And since this is my first try at this engine, I think I should try it in C++ from the beginning...

By the way, are the DirectX SDK and the Windows SDK really necessary as written in the Irrlicht->Code::Blocks tutorial? I'm on mobile phone gprs internet, so huge downloads push me to my 1GB limit really fast... :(.

Posted: Thu Oct 04, 2007 7:26 pm
by hybrid
Windows SDK is not necessary at all when using MingW compiler, you only need it for MSVC Express. There are DX packs on the FAQ forum which contain only the necessary stuff.

Posted: Thu Oct 04, 2007 10:01 pm
by Acki
also have a look at the 7th parameter of addCameraSceneNodeFPS (c++ style): noVerticalMovement

Posted: Fri Oct 05, 2007 2:41 pm
by mironcaius
I added this code to the onevent function in 16.Quake3MapShader but i cannot make it to work with 2 keys pressed. How can i do this , how does the camera work with 2 keys pressed and a node no ??

Posted: Sun Oct 07, 2007 6:39 am
by waldo
Well I'm still learning the cpp myself, but do you mean the "noVerticalMovement"? or "addCameraSceneNodeFPS(0, 100.0f, 300.0f, -1, 0, 0, true);"? Anyway, in some tutorials there is a input section before the real gamestuff begins... That together with some logical thinking and http://www.cplusplus.com/doc/tutorial/ would make a lot of sense, I guess ;). Edit the Collision tutorial input stuff for example, and see what stuff does or doesn't... Anyway you're probably more right than I am (just started leaning c++/Irrlicht 24h ago, got another 24h to go to...).

Two keypresses at the same time? Think that should just be a if keypress (... && ...) :)

I'll get to this tomorrow (when I wake up that is), I'm sure I'll learn as much from it as you do...

Don't take my posts at the moment as they were from a veteran or something... Just got back from a party.. little wasted now :D Allready got two posts at NAE forum removed by moderator. Too offensive I guess.
Anyway I'm gonna look if I can help you out/.

Cheers!

[edit] I edit my posts quite often for bullshi* and punctuation. Sometimes I even remove them completely if the moderator doesn't do it for me :)