jit.phys.world using drawto attribute freezes on fullscreen

Paul Turowski's icon

When I use jit.phys.world with the @drawto attribute instead of connecting it directly to jit.gl.render, the physics engine freezes when I go to fullscreen mode. Is this a bug or is there something I'm not understanding about the way the physics engine works?

Paul Turowski's icon

Turns out it was the latter. When using the @drawto attribute, the jit.phys.world needs to receive bangs to update in fullscreen. Incidentally, this allows updating the physics calculations independently of the frame rate.

Paul Turowski's icon

OK, found some more strange behavior related to the @drawto attribute and fullscreen mode that I think may actually be bug. When I make the window fullscreen the jit.phys.world object looses its hardcoded @drawto value. If I send bangs to the jit.phys.world object, as mentioned above, the physics engine still runs but the gravity value seems to change as a result of the drawto value being reset. I can just send the drawto message again to jit.phys.world every time I go fullscreen as a workaround, so it's not a major problem. Nevertheless it seems strange that it doesn't just retain the value in the first place.

Max Patch
Copy patch and select New From Clipboard in Max.

Here's a basic patch that demonstrates the problem:

Rob Ramirez's icon

hi paul.
can you make sure you're using the latest version of max 6?
i believe 6.1.6 includes a fix for this very issue.

Paul Turowski's icon

Yep that did it. Sorry I didn't think to check this before posting. Anyway, thanks for you response!