A circular physics shape. More...
Import Statement: | import Felgo 4.0 |
Inherits: | |
Inherited By: |
radius : real |
This property holds the radius of the Circle in pixels. If you use a Circle shape, this property must be set! The default value is 0.
The collider will align its top left corner with the top left corner of the target Item. To correctly align the circle center, the target's width and height should be radius * 2. You can set it to half of the width of a round entity to approximate the physics shape from the Image like in this example:
EntityBase { entityId: "circle1" entityType: "circle" width: circleImage.width height: circleImage.height Image { id: circleImage source: "img/circle.png" anchors.centerIn: parent // the CircleCollider has its origin in the top-left } CircleCollider { // approximate the collider with the image size - if the image is circular, this is a good approximation radius: circleImage.width/2 } }
x : real |
This property allows to change the x
position of the Circle's center.
y : real |
This property allows to change the y
position of the Circle's center.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: