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


OverviewFelgo 3 Support (Qt 5) › Is it possible to make a BoxCollider rounded?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #10783


    Hello guys,

    first of all, I would like to thank you for the great support so far.

    Second of all…    I am having some problems during my game project due to the corners of the BoxCollider. To make it clear… imagine that the floor in my game consists of many entities that use BoxCollider to detect collision. These entities are placed horizontally and my main character walks over them.

    The problem is that sometimes one of these entities is a little bit rotated, and my character’s BoxCollider collides with the floor horizontally (due to the corners being in contact).

    How can I solve this problem elegantly? I believe it would be great to have a property on BoxCollider called radius, it would behave like the Rectangle.radius from QT documentation, making the shape a little bit rounded on the corners.

    Thank you again.

    • This topic was modified 8 years, 6 months ago by  CiceroDev.

    Felgo Team

    Hi CiceroDev,
    thanks for your praise, we love that! 😉

    As we use the Box2D physics engine, the colliders available in Felgo are based on the Box2D colliders. Unfortunately, there’s no easy way to get rounded corners, because a radius setting similar to the Qt Rectangle is not supported for the BoxCollider currently.

    You can try using a CircleCollider or PolygonCollider to get the shape you want. The CircleCollider uses a full circle, so it might not be the best if your base shape is more like a rectangle. With the PolygonCollider you can create your own custom shapes, for example an octagon shape, so the edges are cut off.

    • This reply was modified 8 years, 6 months ago by  GT.
Viewing 2 posts - 1 through 2 (of 2 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