my own map doesnt appear in collision test

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.
RayOfAsh
Posts: 56
Joined: Wed Dec 24, 2003 4:08 am
Location: San Diego
Contact:

my own map doesnt appear in collision test

Post by RayOfAsh »

i renamed the maps to point to my maps:

Code: Select all

device->getFileSystem()->addZipFileArchive("data/test1.pk3");

scene::IAnimatedMesh* q3levelmesh = smgr->getMesh("test1.bsp");

And i dont get any errors, but i also dont see anything. Just a black screen. I checked the console and it is finding my textures. Whats wrong? Is it the lighting or something?

I see a flash of what looks like my map for a split second, and then nothing.

Im using OpenGL render mode, because the Dec-C++ dll doesnt seem to support DirectX yet.

The normal collision test works fine, except that sometimes it keeps walking and there seems to be a lag between the time i press the button and the time it responds to it.
Image
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

Post by DarkWhoppy »

Do you have an active camera?
RayOfAsh
Posts: 56
Joined: Wed Dec 24, 2003 4:08 am
Location: San Diego
Contact:

Post by RayOfAsh »

Im using the collision demo's code. I assume it has a camera.
Image
qwe
Posts: 112
Joined: Sun Dec 28, 2003 12:54 am
Location: Oregon, USA

Post by qwe »

it could be that the camera in the default position is embedded in some 3d object, thus causing a black screen.
RayOfAsh
Posts: 56
Joined: Wed Dec 24, 2003 4:08 am
Location: San Diego
Contact:

Post by RayOfAsh »

could be, how do i know where it will pop up?
Image
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

Post by DarkWhoppy »

Set the cameras target to the position of the level node.

camera->setTarget(vector3df(level_node->getPosition()));

Then see if you still get a blank screen.
RayOfAsh
Posts: 56
Joined: Wed Dec 24, 2003 4:08 am
Location: San Diego
Contact:

Post by RayOfAsh »

Well the level isnt exactly a node, and i dont know how to make it one.
And when i change the "level_node" to "q3node" it gives me:

112 C:\irrlicht\projects\fps\main.cpp
no match for call to `(irr::core::vector3df) (const


Im putting the code right below:

Code: Select all

	camera = smgr->addCameraSceneNodeFPS(0,100.0f,300.0f);
	camera->setPosition(core::vector3df(5,5,5));
Image
SuryIIID
Posts: 14
Joined: Mon Dec 29, 2003 8:54 pm
Location: Bulgaria..?

Post by SuryIIID »

And i dont get any errors, but i also dont see anything. Just a black screen. I checked the console and it is finding my textures. Whats wrong? Is it the lighting or something?

I see a flash of what looks like my map for a split second, and then nothing.
I think you are starting outside of the level and the camera gravity is causing you to fall really fast
Just disable your collision detection code and fly over to find your map then you can change either your camera start position or the map position in your code so that the camera starts somewhere in the level.
RayOfAsh
Posts: 56
Joined: Wed Dec 24, 2003 4:08 am
Location: San Diego
Contact:

Post by RayOfAsh »

Yes thats exactly whats happening, but how do i know the coordinants?
Image
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

Post by DarkWhoppy »

RayOfAsh wrote:Well the level isnt exactly a node, and i dont know how to make it one.
Try this...

IAnimatedMesh* Level_Mesh = Smgr->getMesh("LEVEL_FILE_NAME");
ISceneNode* LevelNode = Smgr->addAnimatedMeshSceneNode(Level_Mesh);
RayOfAsh
Posts: 56
Joined: Wed Dec 24, 2003 4:08 am
Location: San Diego
Contact:

Post by RayOfAsh »

DarkWhoppy wrote:
RayOfAsh wrote:Well the level isnt exactly a node, and i dont know how to make it one.
Try this...

IAnimatedMesh* Level_Mesh = Smgr->getMesh("LEVEL_FILE_NAME");
ISceneNode* LevelNode = Smgr->addAnimatedMeshSceneNode(Level_Mesh);

i get 50 C:\irrlicht\projects\fps\main.cpp
`Smgr' undeclared (first use this function)
Image
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

Post by DarkWhoppy »

"Smgr" is the scene manager...... replace it with the name of yours.

Thats the one in the Quake3 tutorial...
scene::ISceneManager* smgr = device->getSceneManager();
RayOfAsh
Posts: 56
Joined: Wed Dec 24, 2003 4:08 am
Location: San Diego
Contact:

Post by RayOfAsh »

Okay, now there is a duplicate map :roll: . And nothing happens.
Image
DarkWhoppy
Posts: 386
Joined: Thu Sep 25, 2003 12:43 pm
Contact:

Post by DarkWhoppy »

RayOfAsh wrote:Okay, now there is a duplicate map :roll: . And nothing happens.
Nothing happens?? ... you were having a problem with finding the map, thats all I was trying to help with.
RayOfAsh
Posts: 56
Joined: Wed Dec 24, 2003 4:08 am
Location: San Diego
Contact:

Post by RayOfAsh »

Yes but THAT problem was solved a whilea go, now i need help starting in it.
Image
Post Reply