Forums

OverviewFelgo 2 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.

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