Generic collisions

hi there,

i'm starting to put some medival houses into my landscape. the player should not be able to walk through them (can be solves by a simple boundingbox), but i'd like to make the collisions a bit more accurate (player walking on the rooftop which is not flat). the majority of jme users seem to use rays to check if there is "something". isn't this rather slow when using models having >1k triangles and pretty inaccurate when using rays to check if they hit invisible box bounds?



the theory i made up so far is to shoot a ray upwards when jumping, one forward, and one downward to check where and if the player is standing. will this work, or am i on the wrong track here?

when u just wanna tell if it hits something, u dont have to use triangle accuracy, so it doesnt check all the triangles.



besides, even if u use traiangle accuracy, u r only checking a child of the house model not the entire model node.



set check distance to true and only check the first spatail u hit~

I recommend using a different collision geometry exclusively for collision checks. You can just set its culling mode to ALWAYS and noone every sees what he's running into  :smiley: This way you can use MUCH simpler geometries, for example a simple cylinder could enclose a tree with 1k triangles, etc.



I'm doing it this way and it works perfectly!

this would require someone to build these bounding geometries or write an algorithm to generate them. could lod be useful for this?