Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

Forums

OverviewFelgo 1 Support › BoxCollider rotation issue

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6143

    gshrman

    Could somebody tell me why the following code places the BoxCollider at a different location than the Rectangle?

    EntityBase {

    Rectangle {
    id: s1
    width: 100
    height: 5
    x: 100
    y: 0
    rotation: 90
    transformOrigin: Item.TopLeft;
    }
    BoxCollider {
    id: bc1
    width: 100
    height: 5
    x: 100
    y: 0
    rotation: 90
    transformOrigin: Item.TopLeft;
    bodyType: Body.Static
    }
    }

    Thanks!

    #6144

    Martin

    Probably is the same issue as this.

    Best, Martin

    #6150

    Alex
    Felgo Team

    Yes, Martin is right, the problem is that Box2D isn’t supporting the transformOrigin property.

    Can you do it just by changing the position of the rectangle and the collider inside the entity? You could also send me a screenshot (support@felgo.com) of how it should look and i can try to help you.

    Cheers,
    Alex

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.