*SOLVED* See through walls

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
iam13013
Posts: 31
Joined: Sun Dec 04, 2005 11:06 pm

*SOLVED* See through walls

Post by iam13013 »

I am working of a small FPS, and I have a test level with 1 room and a hallway.

When I stand in the room, I can see through the walls into the hallway, but when I stand in the hallway, It works correctly, and I can't see through the walls. I have tried correcting the normals, and flipping normals, but still nothing changes.

I am using IrrSpintz with OpenGL.

Here is the complete project... (161 kb)

If you know what causes this and how to fix it, please help...
Thanks...
Last edited by iam13013 on Sat Jan 28, 2006 3:28 am, edited 1 time in total.
krama757
Posts: 451
Joined: Sun Nov 06, 2005 12:07 am

Post by krama757 »

Does this happen while simply standing in the room? Or while you are very close to the wall?

I think it might just be a camera positioning problem. Try adding a collision responce animator to the camera that doesnt allow it to get too close to a wall or go through it.
Guest

Post by Guest »

I think you simply have 1 quad as a wall - in this case you have to disable backface-culling (normally the renderer just renders one side of a polygon (because usually you dont need the backface) - I recommend to to model a real wall (both sides) or, like i said, disable backface culling (which may result in a performance lost)
iam13013
Posts: 31
Joined: Sun Dec 04, 2005 11:06 pm

Post by iam13013 »

I have tried using a real wall for this, but it still happened. I also tried disabling the backface-culling, using this that I found in the forums...

Code: Select all

node->setMaterialFlag(EMF_BACK_FACE_CULLING,false);
But nothing changed.

Is this the correct way to do so?
Does this happen while simply standing in the room? Or while you are very close to the wall?
No. No matter how far away from the wall I am, the wall can be seen through. The wall is still textured, but it draws what is behind the wall, on top of it.

Please Help...
Guest

Post by Guest »

Nothing wrong with the mesh, the texture is off.
Try using the other devices ( DX, Software)
Best guess is driver problem, as the mesh is fine
in normal Irrlicht in Dx and OpenGl with a simple test
program.
iam13013
Posts: 31
Joined: Sun Dec 04, 2005 11:06 pm

Screenshot

Post by iam13013 »

This is what the error looks like...
The camera is in a room that connects to another room with a walkway...
The camera is currently looking at a solid, non-transparent wall, yet you can see the walkway and the other room clearly...

Image

Like I mentioned before, I am using OpenGL...
DirectX makes everything jagged and non-recognizable...
The Software renderer just displays a blank screen...
iam13013
Posts: 31
Joined: Sun Dec 04, 2005 11:06 pm

Well, I feel like an idiot...

Post by iam13013 »

I placed this code in my program

Code: Select all

node->setMaterialFlag(EMF_ZBUFFER , false);
trying to find a way to make sure the gun was drawn on top of the walls. I placed it, then forgot about it.

I was looking over everything today and I saw it. I almost slapped myself. I removed it, re-compiled, and started it up. Sure enough...Problem Solved...
Feel free to leave posts commenting on my lack of intelligence.
Post Reply