Hi. Since updating to Felgo 2.6, I’m having a couple of problems accessing the properties of some entities and boxColliders. In Felgo 2.5 I can access a property I defined by using: selectedBody.parent.myProperty, but I’m now getting an error. I’ve included some example code below. Thanks, Phil
Common.LevelBase {
//...
EntityBase {
//...
MouseArea {
//...
onPositionChanged: {
selectedBody = physicsWorld.bodyAt(Qt.point(mouseX, mouseY))
selectedBody.parent.isDead = true // error in this line
var splatid = entityManager.createEntityFromUrlWithProperties(Qt.resolvedUrl("Splat.qml"),{x:selectedBody.getWorldCenter().x, y:selectedBody.getWorldCenter().y})
var splat = entityManager.getEntityById(splatid)
splat.colorString = selectedBody.parent.colorString // error in this line
}
}
}
}
The qml files for my entities are:
EntityBase {
//...
property bool isDead: false
property string colorString: "green"
BoxCollider {
//...
}
}
and Splat.qml :
EntityBase {
//...
property string colorString: "red"
Image {
//...
}
}