Clipping problem.
-
- Posts: 5
- Joined: Thu Apr 29, 2010 5:12 am
Clipping problem.
as you can see the gun seems to go right through the column when it's not suppose to, wonder if it's because it's the child of another scene node or i forgot to set a flag to enable clipping or what ever it's called? (Z enable?) anyways, hope you guy can help me, i've basically did everything my self programatically but have a long ways to go, just want to fix this clipping issue.[/img]
-
- Posts: 23
- Joined: Thu Aug 09, 2007 5:16 pm
Same Problem
Same problem here ...
I did slight modifications to the "Loading Scenes from .irr Files" example
First i iterate through all the nodes available in the scene, and for nodes of type ESNT_MESH (the gun is an IMesh), i do the following
Then the selector is added to meta selector
Then I create an animator,
But when I execute the code, the camera collision works fine, but the gun clips through the scene contents!!!
I did slight modifications to the "Loading Scenes from .irr Files" example
First i iterate through all the nodes available in the scene, and for nodes of type ESNT_MESH (the gun is an IMesh), i do the following
Code: Select all
selector = smgr->createTriangleSelector(((scene::IMeshSceneNode*)node)->getMesh(), node);
Code: Select all
meta->addTriangleSelector(selector);
Code: Select all
anim = smgr->createCollisionResponseAnimator(
meta, gunnode, core::vector3df(200,200,200),
core::vector3df(0,0,0));
meta->drop(); // I'm done with the meta selector now
gunnode->addAnimator(anim);
anim->drop();
i guess thats your weapon inside the wall. you can fix that by deactivating the ZBuffer for the gun.
only disable ZBuffer not zwrite!
only disable ZBuffer not zwrite!
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
-
- Posts: 23
- Joined: Thu Aug 09, 2007 5:16 pm
Still not working
Hi Sudi, Thanks for the reply.
I tried what you suggested, now it works with opengl, but when i use directx, the gun mesh goes behind everything in the scene. (as if it is in the bottom-most layer, and other objects in the scene are displayed over it!!!)
any suggestions?
I tried what you suggested, now it works with opengl, but when i use directx, the gun mesh goes behind everything in the scene. (as if it is in the bottom-most layer, and other objects in the scene are displayed over it!!!)
any suggestions?
i guess d3d handles the zbuffer flags different? dunno
do you need d3d? do you have to support both drivers?
do you need d3d? do you have to support both drivers?
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
-
- Posts: 23
- Joined: Thu Aug 09, 2007 5:16 pm