Forums

OverviewFelgo 2 Support (Qt 5) › CircleCollider and setting explicitly width and height

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #18717

    Marcin

    Hi Felgo,
    Like in the title, question: when you use CircleCollider, should you set width and height despite that radius specify dimensions of the collider?
    I ask because I managed to hit case when not settings this cost me 1-2 days of work to figure weird behavior 🙂

     

    I don’t want to go into details too much, it was some rather complex scenario where one dynamic body is “inside” another dynamic body while both are moving and also the scene is moving.
    The problem was that in this situation, colliders were constantly firing fixture events in loop(beginContact, changeContact, finishContact).
    Even if the smaller body was all the time inside the bigger one, never leaving it.
    Once I set explicitly width and height to CircleCollider, boom, problem solved.
    Suddenly no fake events are triggered apart from contactChanged, no more contactFinished and contactStarted every frame.

     

    What also changed is that in the debugDrawVisible: true mode, the square lines around collider, stopped changing height all the time, when scene was moving.

     

    I am curious, if am I just completely wrong here or there can be a difference when you set width and height in CircleCollider.
    Maybe it shouldn’t matter in the end?

     

     

    #18719

    Alex
    Felgo Team

    Hi Marcin,

    interesting scenario. We did not yet face similar issues when no setting width and height of the CircleCollider explicitely. But good to know this could solve possible issues in some cases.

    I would need to have a closer look at the implementation, but since they physics engine also uses the size of fixtures to determine physical characterisitcs, like its weight, I’d say yes it can matter indeed.

    Cheers,
    Alex

    #18720

    Marcin

    Hi Alex,
    Thank you for answer.

    Definitely, in my case, setting those parameters saved the day.
    Easy and quick solution.
    I tried to create a small example but it’s hard 🙂
    For now will leave it, if I ever get the chance maybe will be able to create some sample scenario.

    #18747

    Wojciech

    Hi Marcin,

    It seems I need a co-developer in a V-play application. Please write to me at wojtek[at]entim.pl if interested.

    Regards,

    Wojciech

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support