jit.phys.world using drawto attribute freezes on fullscreen

Jan 29, 2014 at 8:52pm

jit.phys.world using drawto attribute freezes on fullscreen

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?

Jan 30, 2014 at 2:00pm

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.

Jan 30, 2014 at 8:21pm

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.

Here’s a basic patch that demonstrates the problem:


– Pasted Max Patch, click to expand. –


Feb 3, 2014 at 12:36pm

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.

Feb 3, 2014 at 12:45pm

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


You must be logged in to reply to this topic.