Possible bug is physics joints?

0 favourites
  • 6 posts
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • I asked a question about a game I'm working on. It involved a ship attaching to a block via a physics joint. The problem was, when you thrust up the screen with the block attached, the block moved gradually closer to the ship until it eventually was above it.

    User R0j0hound mentioned it could be a bug with the physics joints. He's far more clued up than I am with the technical side of things, so just in case it is a bug, I'm posting it here.

    R0j0hounds reply t looks like it's a bug with joints. I landed on a higher ledge and the orange box just sat above the rocket like you said. The joint offsets aren't the same at different positions.

    Here's a demo of the CAPX showing what I mean. Move the ship above the block, then thrust up the screen and you'll see the problem.

    System Spec

    AMD 645 Athlon X4 Black Edition

    4mb RAM

    Nvidia 560 ti graphics card

    Windows 7 64

    Google Chrome Version 23.0.1271.40 beta-m (have tried with none beta version too and IE9)

    DEMO

    And here's the CAPX so you can have a proper look at what's going one.

    CAPX

    Cheers.

    EDIT just added system specs and browser info etc.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Your .capx link is a 404. Please make sure the link works!

    Note: I already think it's unlikely this can be fixed, because we don't have any code to do with joints beyond telling Box2D to create a joint, and the rest is handled by Box2D. So it may be a Box2D bug. Also, if you are using non-physics behaviors or moving physics objects with events, we can't support this case, because it conflicts with the Physics behavior and we always recommend you don't do that.

  • That's weird, the link was working the other day. Re-uploaded it now. I understand what you're saying about it being out of your hands, if you can confirm it's probably a Box2D bug I could message them maybe and see what they say.

    Cheers.

  • Ashley I've fixed it ... sort of. The ship was an animated sprite, made up of four frames. When I remove the animation, it works fine. I've double-checked the image points are all the same, they are. Can you not use animation with physics objects?

  • vandinz - yeah, animation doesn't really play nice with the Physics behavior because it has to re-create the body every animation frame in case the size, collision mask, origin or image points are different. You can work around it by using non-animated objects with the Physics behavior and pinning an animated sprite on top of that. Not sure if we can fix this otherwise...

  • OK np, that's a good solution I could use. Thanks for taking a look.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)