Dynamic Shadow Occluders

I'm having some trouble with casting shadows of dynamic models. I've been looking for a solution for a little while without success, but it feels like i'm just missing a simple command that an expert will know right away.



I load multiple MD5 models that all cast shadows on all other objects of the world. The models are animated using the standard MD5 animation controller. For example, I might have 1 bird, 1 tree, and the ground. The bird has two animations, one that flaps the wings and one that rotates the head. The wings flap when it flies and the head rotates when it perches somewhere.



My problem is that the shadows do not update unless I change the model node position. So when the bird is flying, I animate the MD5 which flaps the wings and also change its position (setLocalTranslation) in the world, and the shadows update fine. However, if the bird perches somewhere, it's head rotates while it's position is static, and the shadow renderer never updates the shadow casted by the bird.



Any idea?






That sounds like the same problem i had in this thread http://www.jmonkeyengine.com/jmeforum/index.php?topic=7669.0



basically you need to call setHasDirtyVertices(true) on the geometry

awesom thanks. i was looking for that function at the wrong place. that's perfect.