Teaser: Physics hinge joint using Castle Game Engine

Andrzej Kilijański is working on joints in our physics in Castle Game Engine. This is a short video from our today’s session, constructing a quick 3D demo scene for hinges 🙂

(Watch on youtube).


Can we take advantage of the newly physics preview buttons to make it works not with just physics only, but for example custom behaviors and potentially scriptable components?

Yes and no :slight_smile:

The physics preview doesn’t include the project’s code in any new way. We just enable physics, and let it work – previously physics was (and still is on “master” branch) just disabled when CasleDesignMode=true. So we just enable it in special “physics preview” mode, and we make sure to restore design state to the original once you stop the preview.

That said, you can use custom components with custom editor build ( Editor | Manual | Castle Game Engine , Custom Components | Manual | Castle Game Engine ) just like now. They work in design-mode, and they could conditionally work differently depending on whether “physics preview” is active or not.

I could we should invent a more general name for it, not “physics preview”. So instead of boolean CasleDesignMode we should have enum like (appRunning, appRunningPreview, appDesign) and the custom components can react to these in any way.

1 Like

Thanks. appRunning, appRunningPreview, appDesign is exactly what I need in order to create custom components that allows us to preview on how it behaves directly in editor.