Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 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.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded