Animations faster than before... why?

Sirs,



I was using DebugGameState in my StandardGame. Then I did my custom-GameState just extending BasicGameState. Now I find that all animations (managed by spatial-transformers) are faster, much faster than before, and they don't respect the times setted (spatial-transformers).



When I put back DebugGameState, then the animations go normal again. I checked my custom-GameState and it seems to be correct. I am not treating with times in my custom-GameState



Any idea why is this happening?



Thank you.

That's what you get for not using StandardGame.  :stuck_out_tongue:



Are you perhaps updating the timer more than once per update?

Perhaps DebugGameState is the problem? Don't forget you can always take a look at the jME source, it still might have bugs :slight_smile:

maybe updateGeometricstate() (which triggers controllers) is somehow called more than once per spatial.

it should only be called once per update cycle.

Are you perhaps updating the timer more than once per update?


No, I am not touching the timer. I am using StandardGame since "long" time ago...  :wink:

Perhaps DebugGameState is the problem? Don't forget you can always take a look at the jME source, it still might have bugs


But, I guess you already tested your custom-GameState with spatial-transformers in StandardGame, and I guess it worked, didn't it?

maybe updateGeometricstate() (which triggers controllers) is somehow called more than once per spatial.
it should only be called once per update cycle.


Mmm...  :?
manuelbarzi said:

Mmm...  :?

mhhh :)
make sure, that in you custom Gamestate, you call rootNode.updateGeometricState(tpf) only once per update cycle.

Core-Dump you are right!



What was happening is this:



MyGameState extends BasicGameState {
        public void update(float tpf) {
      super.update(tpf);
      ...
      rootNode.updateGeometricState(tpf, true);
      ...
   }



and checking BasicGameState I found:


BasicGameState extends GameState {
        public void update(float tpf) {
      rootNode.updateGeometricState(tpf, true);
   }



Then, as you predicted, I was implicitly calling rootNode.updateGeometricState(tpf, true); twice per update-cycle!

Thank you  :?  ;)

mmh :wink:

That's what you get for not using StandardGame.


You need an infomercial DarkFrog, I can just see you being the next Shami/StandardGame spokesperson.  3 in the morning DarkFrog comes on and if you call RIGHTNOW you can get 2 StandardGames for the price of one.  :D