Physics: Revolute joint busted when using Image Point 0

Bugs will be moved here once resolved.

Post » Sat Mar 29, 2014 8:48 pm

Problem Description
If you add revolute joints to physics objects and tell it to use image point 0 as hinge (and you moved the center correctly), it will still use an imaginary midpoint instead of image point 0. If you add another image point and use that one instead, it works as expected. Tested on Box2D web, and Box2D asm.js.

Attach a Capx
http://honigmilch.com/capx/revolute_joint.capx

Description of Capx
Left rope uses image point 0, right rope uses image point 1, to show the difference.

Steps to Reproduce Bug
    Hit F5.

Observed Result
An imaginary midpoint is used as hinge

Expected Result
The correct image point 0 should be used as a hinge

Affected Browsers
  • Chrome: (YES)
  • FireFox: (n/a)
  • Internet Explorer: (n/a)

Operating System and Service Pack
Win7 64

Construct 2 Version ID
R165
B
73
S
28
G
32
Posts: 480
Reputation: 19,671

Post » Mon Apr 28, 2014 7:17 pm

I'm glad you took the time to make this. I was having a lot of trouble using revolute joints too. I thought it was broken but the image point stuff is true.!
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153

Post » Fri May 02, 2014 4:14 pm

It's actually by design that image point 0 refers to the centre of gravity, not the origin. However there's a workaround: enter -1 for the image point and it uses the origin.
Scirra Founder
B
395
S
231
G
88
Posts: 24,367
Reputation: 193,694

Post » Tue May 13, 2014 8:09 pm

That is really good to know, Thanks!
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests