Below simple scene to reproduce the problem:
import QtQuick 1.1
import Box2D 1.0
import VPlay 1.0
GameWindow {
id: window
width: 480*2
height: 320*2
Scene {
id: scene
width: 480
height: 320
Item {
id: level
// OLD, not working prior to v1.4:
//anchors.fill: parent
//FIX:
width: parent.width
height: parent.height
Rectangle {
anchors.fill: parent
}
EntityBase {
entityType: "wall"
BoxCollider {
bodyType: Body.Static
}
Rectangle {
color: "black"
anchors.fill: parent
}
height: 1
anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
}
Item {
x: width*3
y: parent.height/2
}
}
PhysicsWorld {
id: physicsWorld
z: 1
updatesPerSecondForPhysics: 60
velocityIterations: 5
positionIterations: 5
}
}
EntityManager {
id: entityManager
entityContainer: level
}
}
Here is the debug log:
Setting default orientation to 2 (0=portrait, 1=landscape, 2=auto, 3=sensorPortrait, 4=sensorLandscape)
VPlayApplication: log messages are enabled by default, because it is a debug build
VPlayApplication: …adding this import path for VPlay engine: “:/qml”
VPlayApplication: adding pluginPathGeneric as importPath: “/Users/vlad/bin/../Resources/plugins/generic”
VPlayApplication: adding PLATFORM_PLUGIN_PATH as importPath: “/Users/vlad/bin/../Resources/plugins/macx”
VPlayApplication: importPathList: (“:/qml”, “/opt/local/v-play/Desktop/FelgoSDK/plugins/macx”, “/opt/local/v-play/Desktop/FelgoSDK/plugins/generic”, “/Users/vlad/bin”, “/opt/local/v-play/Desktop/Qt/4.8.1/gcc/imports”)
VPlayApplication: pluginPathList: (“/opt/local/v-play/Desktop/FelgoSDK/plugins/macx”, “/opt/local/v-play/Desktop/FelgoSDK/plugins/generic”, “/Users/vlad/Downloads”, “/Users/vlad/Downloads”, “.”)
VPlayApplication:startApplication()
VPlayApplication: rootContext of qmlViewer: QDeclarativeContext(0x104367c40)
VPlayApplication: using CocosDenshion for audio
…before cocosApplication.run()
VPlayAppDelegate::applicationDidFinishLaunching()
create EngineScene from delegate
call of EngineScene::scene()
call of Scene:init()
Cocos2DWrapper::setTargetScene() called
Cocos2DWrapper: windowSizeChanged: shift the cocosScene-layer up by its winSize width: 960 , height: 640
Cocos2DWrapper: windowSizeChanged: new windowSize: QPointF(960, 640) , displaySize: QPointF(960, 640)
Box2DWorld: set gravity to QPointF(0, 0)
QDeclarativeExpression: Expression “(function $displayFpsEnabled() { return system.debugBuild })” depends on non-NOTIFYable properties:
System::debugBuild
QDeclarativeExpression: Expression “(function $resolutionChangingWithKeysEnabled() { return system.desktopPlatform })” depends on non-NOTIFYable properties:
System::desktopPlatform
Scene: returning 1 for the xScaleForScene, but sceneGameWindow was invalid! this is the scene: Scene_QMLTYPE_6(0x102db56e0)
Scene: xScaleForScene changed to 1
Scene: calculate x of scene based on sceneAlignmentX center
Scene: calculate y of scene based on sceneAlignmentY center
Scene: yScaleForScene changed to 1
QDeclarativeExpression: Expression “(function $visible() { return system.debugBuild })” depends on non-NOTIFYable properties:
System::debugBuild
GameWindowItem: found GameWindowItem – register it as contextProperty for rootContext
QDeclarativeExpression: Expression “(function $visible() { return system.debugBuild })” depends on non-NOTIFYable properties:
System::debugBuild
Scene: onSceneGameWindowChanged changed to GameWindow_QMLTYPE_4(0x102d30870, “gameWindow”)
Scene: xScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
Scene: yScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
Scene: onScaleModeChanged: xScaleForScene( 1 ) is different than from GameWindow ( 0 )
GameWindow: xScaleForActiveScene changed to 1
set the __scaleImageSuffixList to:…
# 0 : -sd
Scene: xScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
Scene: xScaleForScene changed to 2
changing xScaleForActiveScene to 2 from scene Scene_QMLTYPE_6(0x102db56e0)
GameWindow: xScaleForActiveScene changed to 2
set the __scaleImageSuffixList to:…
# 0 : -hd
# 1 : -sd
Scene: calculate x of scene based on sceneAlignmentX center
Scene: calculate y of scene based on sceneAlignmentY center
Scene: yScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
Scene: yScaleForScene changed to 2
Scene: calculate y of scene based on sceneAlignmentY center
Scene: yScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
Scene: calculate y of scene based on sceneAlignmentY center
Scene: calculate x of scene based on sceneAlignmentX center
Scene: xScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
QDeclarativeExpression: Expression “(function $resolutionChangingWithKeysEnabled() { return system.desktopPlatform })” depends on non-NOTIFYable properties:
System::desktopPlatform
QDeclarativeExpression: Expression “(function $displayFpsEnabled() { return system.debugBuild })” depends on non-NOTIFYable properties:
System::debugBuild
VisualItemPropertyObserver componentComplete for item EntityBase_QMLTYPE_8 (this = 0x102dbb350 , parent = 0x102dba830 , geometry = QRectF(0,-1 0x1) , z = 0 )
Box2DWorld::componentComplete()
QDeclarativeExpression: Expression “(function $visible() { return system.debugBuild })” depends on non-NOTIFYable properties:
System::debugBuild
Scene: yScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
Scene: calculate y of scene based on sceneAlignmentY center
Scene: calculate x of scene based on sceneAlignmentX center
Scene: xScaleFactorForScene: 2 Scene_QMLTYPE_6(0x102db56e0)
QDeclarativeExpression: Expression “(function $resolutionChangingWithKeysEnabled() { return system.desktopPlatform })” depends on non-NOTIFYable properties:
System::desktopPlatform
QDeclarativeExpression: Expression “(function $displayFpsEnabled() { return system.debugBuild })” depends on non-NOTIFYable properties:
System::debugBuild
Box2DWorld: set contextProperty physicsWorld to this: PhysicsWorld_QMLTYPE_15 (this = 0x102dc2ad0 , parent = 0x102db56e0 , geometry = QRectF(0,0 480×320) , z = 1 )
Assertion failed: (count >= 3), function ComputeCentroid, file qml-box2d/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 76.
cocos2d: cocos2d-1.0.1-x-0.12.0cocos2d: GL_VENDOR: NVIDIA Corporationcocos2d: GL_RENDERER: NVIDIA GeForce GT 650M OpenGL Enginecocos2d: GL_VERSION: 2.1 NVIDIA-8.10.44 304.10.65f03cocos2d: GL_MAX_TEXTURE_SIZE: 16384cocos2d: GL_MAX_MODELVIEW_STACK_DEPTH: 32cocos2d: GL supports PVRTC: NOcocos2d: GL supports BGRA8888 textures: NOcocos2d: GL supports NPOT textures: NOcocos2d: GL supports discard_framebuffer: NOcocos2d: compiled with NPOT support: NOcocos2d: compiled with VBO support in TextureAtlas : NOAbort trap: 6