Physics automatism: object is missing from the window...


I don’t know if it a bug, I think (I hope) it is :smiley:

If I want to setup custom polygon collision mask in Physics automatism, the actual object is missing from the window.
I can make the custom collision mask, but I have no reference of the shape because the window is empty. :confused:
I mean I can see the center or origin point of my object but not the actual object.
I think the object should be there so I can make sure the collision mask fit perfectly.

Please check the Physics with custom polygons example.

It’s not a bug, but it’s impossible to show an object made to be shown in a graphic window (SFML) in a dialog box.

I was worry about that it isn’t a bug :imp:
So I need to guess the shape based on the position of centre or origin :confused:

There are no impossible things, there is only lack of skills.

wxWidgets as far as I know has image component. Just load into it first frame of object’s first animation and display under mask. My old game editor (before I knew about Game Develop) did it like that (it was written in Qt though), though I only went as far as making level editor, no actual work on engine or even saving level was started, so it is certainly possible.

How can you do it for other types of objects (3D box, text object, there are no frames in these objects) ?

  1. Use SFML to render object to picture
  2. Copy picture buffer to image object’s memory, pixel-by-pixel if necessary
  3. Do rest as with normal sprite.

Anyway, I don’t think anyone would need some custom mask for objects other than sprite object, most likely rectangle or circle mask would be all what’s needed.

//edit: Aaand GD itself proves it is possible. Here is editing for default (non-physics) collisions:

You can move vertices freely. I guess similar system can be used for physics collisions as well.