Collision types?

edited August 2013 in Help request
Hello there, I am doing a scene editor for my game to make the levels development faster. I am coding the collsion attributes part now and I was checking the possible collision bodies.
So far I have used only the box and sphere, looking at the API docs I found those:

#define orxBODY_PART_DEF_KU32_FLAG_BOX 0x00000002
#define orxBODY_PART_DEF_KU32_FLAG_MESH 0x00000004
#define orxBODY_PART_DEF_KU32_FLAG_NONE 0x00000000
#define orxBODY_PART_DEF_KU32_FLAG_SOLID 0x10000000
#define orxBODY_PART_DEF_KU32_FLAG_SPHERE 0x00000001

So, I am wondering, what use would there be for None?
And, what would be Solid and Mesh? How are determined?

For now I am keeping support for only Box and Sphere.

Thanks in advance.

Comments

  • edited August 2013
    Knolan wrote:
    Hello there, I am doing a scene editor for my game to make the levels development faster. I am coding the collsion attributes part now and I was checking the possible collision bodies.
    Hi!

    I'm a bit confused by the terms "collision type", it looks like you're taking about the body part properties that are not related to collision, am I wrong?
    So far I have used only the box and sphere, looking at the API docs I found those:

    #define orxBODY_PART_DEF_KU32_FLAG_BOX 0x00000002
    #define orxBODY_PART_DEF_KU32_FLAG_MESH 0x00000004
    #define orxBODY_PART_DEF_KU32_FLAG_NONE 0x00000000
    #define orxBODY_PART_DEF_KU32_FLAG_SOLID 0x10000000
    #define orxBODY_PART_DEF_KU32_FLAG_SPHERE 0x00000001

    So, I am wondering, what use would there be for None?

    It's used for init/re-init.
    And, what would be Solid and Mesh? How are determined?

    Solid determines if a part will actually "collide" physically or simply send collision events without affecting the dynamics (Box2D calls them sensors).
    When Solid == orxFALSE -> it's a sensor.

    Mesh, in 2D, is the convex polygon type. If you look at the spawner tutorial, the orx logo's body is defined with such parts.

    Looking forward to learning more about your scene editor. :)
Sign In or Register to comment.