Physics create revolute joint to image point error

  • Problem Description

    When creating a revolute joint around a sprite's imagepoint(x) the physics engine does not always pick the correct place for the joint pivot point.

    Attach a Capx

    [attachment=0:26flhgi7][/attachment:26flhgi7]

    Description of Capx

    The capx contains 2 physics sprites. Instance Sprite is an immovable object with 2 image points: 0 on the left edge and 1 on the right edge. Sprite2 is a movable physics object. On start of layout, one Sprite is picked by UID to create a revolute joint to each of the 2 Sprite2 objects from one of its image points (these are chosen by UID as well). When you run the layout, it is apparent that one of the Sprite objects is not jointed to the correct position of image point 0.

    Steps to Reproduce Bug

    • Run the layout
    • Observe the action of the Sprite2 objects

    Observed Result

    As described above - one instance of Sprite2 appears to be pivot jointed to the center of Sprite rather than to the left edge.

    Expected Result

    The joint should be created to the correct (and not imaginary) image point.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    W8.1 x64

    Construct 2 Version ID

    r195 64 bit

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is actually by design: using 0 means "connect to the center of gravity", which is in the middle. To connect to the object origin, use -1 (or create another image point there). That wasn't documented anywhere though, so I've updated the manual entry and the parameter descriptions for the next build.

  • Thanks Ashley - it makes sense to have the option to affix a joint to the CG.

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