SimpleApplication don't animate

Hi everyone,

I work in a who use a SimpleApplication in order to show the behavior of a vehicule So I can’t show the code.

My problem is that : in fonction of event in the software i must be use methode like
getMotionControl().play(); or getMotionControl().pause();

i surrounded these method by try catch and it work correctly and I put a println to see if it pass on the boucle when it must to do but my SimpleApplication isn’t animate.

my problem is my SimpleApplication is not focused every time but it must be work even it’s not focused ( i use this method setPauseOnLostFocus(false); but it does not solve my problem)

I reed this topic
my code work with only Jpanel so y use Jpanel to put my canvas.

is that there is another way for replace by awt panel so that my canvas is Forever event focuse and my work right?


To answer in my own topic, I have progressed and I was wrong in fact it’s weird but my bug is that when i use this method System.out.println(this.getContext().isRenderable()); it return false…howeverI see my scene but I can not animate.

I want to find how i can change the variable to true.

Thanks for your help.