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

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
waldo
Posts: 10
Joined: Wed Oct 03, 2007 9:08 pm
Location: Amsterdam

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

Post 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.
If I stop living, does the world stop turning? Everyone will know, except me...

I love signatures, it's like space reserved for bullshi :)
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Collision animator applies gravity so the camera falls, but applies collisions so it doesn't fall through the ground.

Travis
waldo
Posts: 10
Joined: Wed Oct 03, 2007 9:08 pm
Location: Amsterdam

Post 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...
If I stop living, does the world stop turning? Everyone will know, except me...

I love signatures, it's like space reserved for bullshi :)
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post 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
waldo
Posts: 10
Joined: Wed Oct 03, 2007 9:08 pm
Location: Amsterdam

Post 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... :(.
If I stop living, does the world stop turning? Everyone will know, except me...

I love signatures, it's like space reserved for bullshi :)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

also have a look at the 7th parameter of addCameraSceneNodeFPS (c++ style): noVerticalMovement
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
mironcaius
Posts: 3
Joined: Wed Oct 03, 2007 1:20 pm

Post 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 ??
waldo
Posts: 10
Joined: Wed Oct 03, 2007 9:08 pm
Location: Amsterdam

Post 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 :)
If I stop living, does the world stop turning? Everyone will know, except me...

I love signatures, it's like space reserved for bullshi :)
Post Reply