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

Forums

OverviewFelgo 3 Support (Qt 5) › Collider issue

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

    Furkan

    I’m trying to understand v-play engine and trying to do some edit with the “doodle jump” example. I removed auto-jump and player now triggering the jump himself/herself by simply pushing the “up arrow” key. However, a strange problem appeared and I couldn’t figure out why it is happening. The player(ninja) has it’s own collider and so the bricks he jumps on (obviously). However, I feel colliders that should have the size of bricks is simply have much more height. To make an example of it there are 2 cropped screenshots links below:

    http://imgur.com/Amsonfz

    http://imgur.com/14R2zqc

    One screenshot was taken when the ninja got top of the brick. The other screenshot was taken after the ninja jumped on the very same brick and landed on the very same brick. As you can see there is a big difference where the ninja stands.

    Can anyone explain me why this is happening and how to prevent it?

    Regards…

    #16975

    Günther
    Felgo Team

    For debugging purposes, you can go to the PhysicsWorld item of your game and activate the debugDrawVisible setting.
    This will show the collider boxes in addition to the image sprites, so you can have a look if the sizes are correct.

    If you are using the same collider code for Platform.qml as in the demo, you also have to consider that the collider is set to bodyType: Body.Dynamic and collisionTestingOnlyMode: true.
    This setting only detects collisions but does not affect the physics body when a collision happens. This also means, that if your player falls down and a collision is detected there is no guarantee that the player y-position is directly on top of the platform.

    For a possible solution, you can have look at the Simple Platformer demo, which includes platforms that the player can run and jump on.

    Cheers,
    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