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

Forums

OverviewFelgo 2 Support (Qt 5) › Collisions happens several times

Tagged: 

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

    Isak

    Hello,

    I think my objects collides several times but i only want it to happen one time. cant i use fixture.onBeginContact, i am guessing that this fires on every collision but i initally thought it meant that it collided on first contact. How can accomplish this?

     

    CircleCollider {
            id: shipCollider
            radius: shipSprite.width/3
            collisionTestingOnlyMode: true
            x: shipSprite.width/2 - radius - 3
            y: shipSprite.height/2 - radius
            categories: Circle.Category1
            collidesWith: Circle.Category2
    
            fixture.onBeginContact: {
    
                console.log("KollisionShip")
                lives--
            }
        }

     

     

     

    /Isak

    #15789

    Günther
    Felgo Team
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