OverviewFelgo 1 Support › Layout of game is incorrect in window when I run a test app

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


    Here there I am seeing this:

    When I run the following code:

    import VPlay 1.0
    import QtQuick 1.1
    import Box2D 1.0
    GameWindow {
        EntityManager {
            entityContainer: scene
        Rectangle {
             anchors.fill: parent
             color: "black"
        Scene {
                gravity.y: -9.81
                z: 10
                updatesPerSecondForPhysics: 60
                velocityIterations: 5
                positionIterations: 5
            EntityBase {
                entityId: "box1"
                entityType: "box"
                Image {
                    id: boxImage
                    source: "img/box.PNG"
                    width: 32
                    height: 32
                    anchors.fill: boxImage
        EntityBase {
                 entityId: "ground1"
                 entityType: "ground"
                 height: 20
                 anchors {
                     bottom: scene.bottom
                     left: scene.left
                     right: scene.right
                 Rectangle {
                     anchors.fill: parent
                     color: "blue"
                 BoxCollider {
                     anchors.fill: parent
                     bodyType: Body.Static // the body shouldn't move


    I am pretty sure that the blue rectangle should be at the bottom but cannot figure out what I am doing wrong.

    • This topic was modified 6 years, 1 month ago by  Stan.

    Felgo Team

    Hi Stan,

    that was a tricky one – took me a while to figure it out. 😉

    You have placed your ground entity not within the Scene. Just move it as child of Scene and it should work fine.

    Cheers, Chris



    Aha! Thanks for the feedback Chris. Got it working.


    Felgo Team

    That’s great to hear Stan!

    Cheers, Chris

Viewing 4 posts - 1 through 4 (of 4 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
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support