issue with collisions in blitz3d

Blitz3D Forums/Blitz3D Beginners Area/issue with collisions in blitz3d

chrisnorris007(Posted 2009) [#1]
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


Matty(Posted 2009) [#2]
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.


Drak(Posted 2009) [#3]
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.


chrisnorris007(Posted 2009) [#4]
now it looks ok, but you can still walk into it... and get stuck by the way


chrisnorris007(Posted 2009) [#5]
any idea why the collisions arent working against the tree?


Stevie G(Posted 2009) [#6]
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


chrisnorris007(Posted 2009) [#7]
my level is multiple meshs and i am accounting for that
using a T.ed map


chrisnorris007(Posted 2009) [#8]
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!


Ross C(Posted 2009) [#9]
With multiple meshes, you must loop through each mesh and give each piece an entitytype remember.


chrisnorris007(Posted 2009) [#10]
i did :) its still not working


Ross C(Posted 2009) [#11]
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.


Floyd(Posted 2009) [#12]
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.


chrisnorris007(Posted 2009) [#13]
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


chrisnorris007(Posted 2009) [#14]
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?


Ross C(Posted 2009) [#15]
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.