no more jumping FPS camera

A forum to store posts deemed exceptionally wise and useful
Post Reply
paul
Posts: 7
Joined: Sat Sep 11, 2004 7:19 am

no more jumping FPS camera

Post by paul »

hey sorry if this has already been mentioned ,i done a search found nothing on it (well no fix for it anyway)

add this in "CCameraFPSSceneNode.cpp" just before the vector is normalized

movedir.Y = 0;

camera still rotates ,moves forward and stuff seams ok
main rig: AMD64 3000+ ,1gig DDR ,ATI 9800XT ,WinXP
laptop: Intel 2.6mhz ,SiS640 gfx ,256mb DDR ,WinXP

int main()
{
irr::game(device->makegame(DOOM3);
}
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

thnx for the patch!! I'll try it immediately!

btw. nice signature, lol!
Image
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

I thought it would be like this and it is.
This ONLY works if your camera is connected to a CollisionResponseAnimator (so you use physics). Else you can't move your camera up/down anymore because it is stuck at 0!
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

@afecelis:

Code: Select all

/*

THIS IS FREE SAMPLE CODE FROM THE RULEGAME SDK 1.0

see www.di-software.com for details about purchasing our RULEGAME SDK

(c) 2003 di software ltd. (web:www.di-software.com)

contact: salesNOSPAM@di-software.com


(please buy the professional version for only 50$, see www.di-software.com for details)

.pro features: server simulation, online highscores, AI bots, etc

*/

#pragma comment(lib, "rulegameki.lib")
#pragma comment(lib, "ruleenginegfx.lib")
#pragma comment(lib, "rulebeer.lib")

#include <rule.h>

void main()
{
//at first, check if our game is cracked
if(!RuleGame::IsCracked())
{
//create a game with some parameters, see rulesdk documentation for all types
rulestd::auto_ptr<RuleGame> pGame = CreateGame(RULE_TYPE_AAA, RULE_TYPE_MMORPG, RULE_TYPE_DOOM4_STYLE, RULE_SELL_ONE_BILLION);

//tell our advanced, neuronal network driven, design doc parser how the game should act
pGame->SetDesignDoc("dd.txt");

//show elite startupscreen 
pGame->ShowStartupScreen();

//init gamestates (load data and so on)
pGame->Init();

//enter game menu (show setup, etc)
pGame->EnterMenu(RULE_ALIGN_DESIGN_TO_SCRIPT);

//run game
pGame->Rule();

//show everyone who did it!
pGame->ShowCredits("your name here");

//free gamedata
pGame->Dispose();
}
else
{
//he cracked our game?! GO AND GET HIM!
RAS::Call("0-800-PIRACY");
}

//this is only for debugging...
Win32_DecreaseSystemPerformance(BUG_STYLE);
}
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

It worked ok. The only thing is that you loose the ability to climb stuff like ladders. The camera stays restricted to the height specified in the y axis.

but I like it.

thnx for the code, it's freakin' hillarious! I'll compile it tonight and let you know how things went with my neural interface!!! :wink:

cheers!
Image
Scripty

Off topic

Post by Scripty »

@peter
I pasted in your code and now my app wont compile :cry:

The code in that signature wont work, he missed the closing bracket.
But now I think about it, he did it on purpose cuz it would be too easy then, huh?

Quasi code owns.
:lol:
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Now back on topci plz :). I would like to have an FPS-cam which doesn't jump, using another way than setting Y to 0. What if your map is like -100?
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
paul
Posts: 7
Joined: Sat Sep 11, 2004 7:19 am

bal

Post by paul »

bal yeah you are right this is only if u are going to add the collision manager to your camera for walking on the ground

but i suppose you could add another param to the create camera function so u can enable/disable the jumping and have the default set to disable ,that way u can still have the fly cam and walking cam

works for me :)
afecelis: btw. nice signature, lol!
:)
main rig: AMD64 3000+ ,1gig DDR ,ATI 9800XT ,WinXP
laptop: Intel 2.6mhz ,SiS640 gfx ,256mb DDR ,WinXP

int main()
{
irr::game(device->makegame(DOOM3);
}
Aber
Posts: 2
Joined: Fri Oct 29, 2004 3:16 pm

Post by Aber »

I can't compile it, it writes these errors (sorry for long log ;)):

c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(253) : error C2146: syntax error : missing ';' before identifier 'pGlActiveTextureARB'
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(253) : error C2501: 'PFNGLACTIVETEXTUREARBPROC' : missing storage-class or type specifiers
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(253) : error C2501: 'pGlActiveTextureARB' : missing storage-class or type specifiers
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(254) : error C2146: syntax error : missing ';' before identifier 'pGlClientActiveTextureARB'
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(254) : error C2501: 'PFNGLCLIENTACTIVETEXTUREARBPROC' : missing storage-class or type specifiers
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(254) : error C2501: 'pGlClientActiveTextureARB' : missing storage-class or type specifiers
COpenGLTexture.cpp
CVideoOpenGL.cpp
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(253) : error C2146: syntax error : missing ';' before identifier 'pGlActiveTextureARB'
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(253) : error C2501: 'PFNGLACTIVETEXTUREARBPROC' : missing storage-class or type specifiers
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(253) : error C2501: 'pGlActiveTextureARB' : missing storage-class or type specifiers
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(254) : error C2146: syntax error : missing ';' before identifier 'pGlClientActiveTextureARB'
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(254) : error C2501: 'PFNGLCLIENTACTIVETEXTUREARBPROC' : missing storage-class or type specifiers
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.h(254) : error C2501: 'pGlClientActiveTextureARB' : missing storage-class or type specifiers
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.cpp(31) : error C2614: 'CVideoOpenGL' : illegal member initialization: 'pGlClientActiveTextureARB' is not a base or member
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.cpp(31) : error C2614: 'CVideoOpenGL' : illegal member initialization: 'pGlActiveTextureARB' is not a base or member
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.cpp(307) : error C2065: 'pGlActiveTextureARB' : undeclared identifier
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.cpp(307) : error C2065: 'PFNGLACTIVETEXTUREARBPROC' : undeclared identifier
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.cpp(307) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.cpp(308) : error C2065: 'pGlClientActiveTextureARB' : undeclared identifier
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.cpp(308) : error C2065: 'PFNGLCLIENTACTIVETEXTUREARBPROC' : undeclared identifier
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.cpp(308) : error C2146: syntax error : missing ';' before identifier 'wglGetProcAddress'
c:\abe\irrlicht-0.7\source\irrlicht\cvideoopengl.cpp(686) : fatal error C1903: unable to recover from previous error(s); stopping compilation
CD3D8ShaderMaterialRenderer.cpp
Post Reply