Physics create revolute joint to image point error

Bugs will be moved here once resolved.

Post » Thu Jan 29, 2015 5:29 pm

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
physics image point joint error.capx


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
You do not have the required permissions to view the files attached to this post.
A big fan of JavaScript.
B
76
S
20
G
76
Posts: 2,283
Reputation: 47,550

Post » Fri Jan 30, 2015 3:36 pm

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.
Scirra Founder
B
402
S
238
G
89
Posts: 24,613
Reputation: 195,993

Post » Fri Jan 30, 2015 4:37 pm

Thanks @Ashley - it makes sense to have the option to affix a joint to the CG.
A big fan of JavaScript.
B
76
S
20
G
76
Posts: 2,283
Reputation: 47,550


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest