Ray cast -> no result after updating mesh

Hey yo,

i’ve generated a flat map (Mesh map;) , like its said here https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:custom_meshes?s[]=custom&s[]=mesh.

Then i’m updating the verticles of that mesh and call:

[java]setBuffer(Type.Position, 3, BufferUtils.createFloatBuffer(vertices));[/java]

Everything works fine, except the ray cast of that mesh doesnt work anymore


somebody know wat is going on?

I think you have to force the collision data to regenerate:


Not 100% sure that’s the best way. It’s the only way I saw to do it from a reading of the code, though. (something I highly recommend)

1 Like


didnt work so i tryed to call


after that and it worked.

Its kinda slow but it works. Thanks.