Forums

OverviewFelgo 2 Support (Qt 5) › Determine which colliding entity?

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

    Isak

    Hello,

    How do you determine what an entity has collided with? I tried to use an if statement inside fixture.onBeginContact but it didnt allow that? I have the following:

    CircleCollider {
            id: ufoCollider
            radius: ufoSprite.width/2
            anchors.fill: ufoSprite
            collisionTestingOnlyMode: true
            categories: Circle.Category2
            collidesWith: Circle.Category1 || Box.Category1
    
    
    
    
            fixture.onBeginContact: {
    
    
    
    
                    ufo.removeEntity()
                    console.log("KollisionUfo" + Math.random())
    
    
    
    
    
            }
        }

    And i want to determine when this ufo collide with my ship.

     

    Thanks

    /Isak

    #15730

    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.

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