Help with applying a revoult joint to a shape

Get help using Construct 2

Post » Thu Mar 12, 2015 10:06 am

Hi All, I am having some difficulty applying a Revolt joint to a shape, my sample works but has a strange behavior.

I want the boxed to be able to picked up with one click, but there seems to be problem the boxes need to be double clicked before you can move them. the logic I have looks sound please can anyone help me. I been trying all sorts of different ways but to no avail. please see file and pictures bellow. your help would be much appreciated. thanks in advance.

boxes.capx


cube.PNG


eventsheet.PNG
You do not have the required permissions to view the files attached to this post.
B
19
S
3
G
1
Posts: 9
Reputation: 1,942

Post » Thu Mar 12, 2015 2:08 pm

This actually may be a bug in the physics system. I downloaded your capx and did some tests. I was able to get the joint to work on single click if I applied an impulse to the box between creating the Sprite2 object and creating the joint. I gave the impulse a power of 1 in the direction of the Sprite2 so it didn't really cause the box to move but it still did the trick. It appears the problem is caused by the box sleeping. If you quickly grab a box on start up using your current settings, it will grab it with a single click. So, when you create the initial joint on a sleeping object, it wakes it up for a couple ticks but the joint doesn't connect properly. If you then click again before the box sleeps, the joint is created. Using the impulse wakes the box up so the joint can be created.

You may want to do some more testing given the above information and submit a bug ticket. Whether you do decide to submit it or not, the impulse should get you what you need. Good luck with your project.
Last edited by FragFather on Sat Mar 14, 2015 4:42 pm, edited 1 time in total.
B
38
S
12
G
11
Posts: 331
Reputation: 7,712

Post » Sat Mar 14, 2015 1:16 pm

@FragFather thank you so much, works like a charm. :)
B
19
S
3
G
1
Posts: 9
Reputation: 1,942


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 12 guests