You want all your game logic to be based on WakeOnFrame(0)
In the API it says
In general, applications cannot count on behavior execution being synchronized with rendering. Behaviors that use WakeupOnElapsedFrames with a frame count of 0 are an exception to this general rule. Such behaviors will be executed every frame. Further, all modifications to scene graph objects (not including geometry by-reference or texture by-reference) made from the processStimulus methods of such behaviors are guaranteed to take effect in the same rendering frame.
But what if I want to wake up only every 20th frame? Because I want to safe computing time and only compute my game logic every 20th frame (for example). Is this then still synchronized with rendering, or is really only WakeupOnElapsedFrames(0) synchronised?Edit: OK, forget it, it I realised that was a stupid question.
So with pure Java3d a fps - like mouse look is not implemented or possible without the robot class?
Quite possible, and not with robot. Use JInput to read the mouse. I forget how to hide the cursor but there is a way. (of al lelse you could just set
the cursor to a custom cursor thats nil, but there may be a better way.)
ON the first question, yo uwake every frame, and you do whatevre yo uwant. That might be increment a rame counter and exit unelss its
20.
But I wouldnt time anythign based on render rate because that varies all over the palce and you willget uneven results, Do it based on real elapsed clock time.