Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 2 Support (Qt 5) › How to get the contact point coordinates during onBeginContact

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

    Martin

    I need to know where a contact occurs – ideally in entity coordinates, though world coordinates could also help.

    (I’m trying to ask “did I hit my head or my feet?”,  and it is tricky because the platform I’m hitting might be sloped)

    I can see that in Box2D this is available via the GetWorldManifold() method of the contact passed into the BeginContact() handler.

     

    How can I get this info in Felgo?

     

    #8740

    Martin

    I’m bumping this question because it has become quite an issue.

    I’m finding more and more reasons why I need to know where the two entities touched, and haven’t yet been able to see an easy way for me to do the maths/geometry to work it out myself.

    Thanks!

    • This reply was modified 5 years, 9 months ago by  GreenAsJade.
    #8795

    Alex
    Felgo Team

    Hi Martin,

    unfortunately, the Box2D-QML plugin that we are using does not offer this feature out of the box. We will try to add it to one of our next updates, in the meantime though, I would recommend using additional colliders at the top and bottom of your character to determine the point of collision.

    Cheers,
    Alex

    #8796

    Martin

    Hah – good idea – thanks! 🙂

     

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

RSS feed for this thread

You must be logged in to reply to this topic.