issue with collisions in blitz3d
Blitz3D Forums/Blitz3D Beginners Area/issue with collisions in blitz3d
| ||
why when I import a world into blitz3d....I can always walk through the outer wall and can see inside my buildings...but once i walk through I cant walk back....its supposed to be a solid wall but for some reason its transparent until im inside.. chris |
| ||
That is because the 'backfacing' triangles are culled. If you change the entityfx flag to include '16' (I think that's the one) then you will see the backfacing triangles - and from memory collisions will be 2 sided as well. |
| ||
It sounds like the normals are flipped. While the backfaces will show up in a 3d modeling application, they won't show up at all in b3d. Try Flipmesh. |
| ||
now it looks ok, but you can still walk into it... and get stuck by the way |
| ||
any idea why the collisions arent working against the tree? |
| ||
Collisions aren't 2 sided if you enable backface culling. You would need to add the extra poly's in your modeller. Is your level one big mesh or does it have children. If the later then make sure you set collisions for them too - it is not automatic. If that doesn't work, can you post your collision set up code and also your main loop? Stevie |
| ||
my level is multiple meshs and i am accounting for that using a T.ed map |
| ||
its crazy....i can walk right up to the tree...and INTO it through the mesh...yet I cant get back out someone HELP please! |
| ||
With multiple meshes, you must loop through each mesh and give each piece an entitytype remember. |
| ||
i did :) its still not working |
| ||
Does this happen with all the meshes? I think Stevie is correct in saying you will need to physically make the walls in your modeller. Showing the backfacing triangles will not give them collision properties. |
| ||
Each triangle has a front and a back, determined by the order in which vertices appear in the vertex list. The fact that you can walk into a tree suggests that the fronts are on the inner surface of the tree. Try using FlipMesh and see if that fixes the problem. I know that was suggested before. But maybe you have muliple meshes in a model and didn't flip the right thing. That's just a guess. You might think that with "backward" triangles you couldn't see the tree trunk at all. But in fact you can see through the near side of the tree to the inner surface of the far side. |
| ||
well...i have flipped it..I shall flip it back now to see if it works any others suggestions, please hit me up.. if you wish for the entire source code etc let me know chris |
| ||
ok new information: only when I load multiple copies of the same mesh into a T.ed world does it do this....otherwise its just fine if its the only copy any ideas? |
| ||
Can you upload your project so we can run it and give you a better solution. It's hard to tell from what you describe. |