[Resolved] Physics distance joint understanding

Get help using Construct 2

Post » Fri Feb 22, 2013 3:27 pm

I really like physics and have tried the distance joint first. It's a pity but it did not worked as expected. I have created two sprites, added the Physics behavior to the first one and said on start of layout C2 to create a distance joint to the second one. After start of the "game" the physical sprite just drop down, since the other one remained on place. I expected the first one to move/rotate like ticker of a clock under the second one... What was wrong?? Thanks for cooperation.XManBG2013-03-03 21:41:23
B
11
S
3
G
3
Posts: 79
Reputation: 3,343

Post » Fri Feb 22, 2013 4:27 pm

There are two things wrong.

First, you should apply the physics behaviour to both objects.

Second, they're falling down because of gravity. The joint is being created but because they're both being pulled downwards at the same speed you won't see any result.

If you want an object to stay in place then you need to set it to be immovable in the behaviours properties pane on the left side of the layout view - in this case it'll be the base of your pendulum (took me a while to realise that's what you meant by "ticker" :P)

Example capx
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Fri Feb 22, 2013 8:56 pm

:) Thanks for that considerably explanation!! It works.

Maybe someday the implicit condition, that for a Physics joint both objects have to be Physics, could be explicitly added to the manual under the appropriate section, and to the Ashley's tutorial about joints?!

https://www.scirra.com/manual/98/physics

https://www.scirra.com/tutorials/65/physics-in-construct-2-forces-impulses-torque-and-joints#h2a8XManBG2013-02-22 21:32:05
B
11
S
3
G
3
Posts: 79
Reputation: 3,343


Return to How do I....?

Who is online

Users browsing this forum: Draconinho, luisgmolina, Magistross, nedzad, nimos100, R0J0hound, Rezzon71 and 31 guests