Realistic Rope

Get help using Construct 2

Post » Thu Jan 05, 2012 6:31 pm

I can actually make this myself, Im just asking more for advice.

I could take the long process of having like 15 different sprites and then creating revolute joints from 1 to 2, 2 to 33 ect.

but im sure there is a way to do this with instances?
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Thu Jan 05, 2012 7:17 pm

Haven't played with physics much, but if its not set up to click a button to choose the object, IE you can type in the object. Then you can use a for each sprite sprite add joint to sprite(loopindex+1)
Image Image
B
161
S
48
G
90
Posts: 7,348
Reputation: 66,751

Post » Thu Jan 05, 2012 9:03 pm

here's my attempt rope.capx
Last edited by Yann on Sun Sep 14, 2014 10:48 am, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Jan 05, 2012 9:09 pm

Wow that's nice ! well played !
B
7
S
3
G
3
Posts: 26
Reputation: 1,652

Post » Thu Jan 05, 2012 9:24 pm

Thanks @Yann, Really cool Demo!! Definitely going
to use this :) although a little heavy on the FPS
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Thu Jan 05, 2012 9:30 pm

play with the height of the joints and the rSpawner.size to find good looking yet not too heavy values (:Yann2012-01-05 21:30:33
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sat Jan 21, 2012 7:51 pm

@Yann, How would you handle player interaction with this?

If i want the player to be able to climp and swing onto it?

Thanks.
B
7
S
1
G
1
Posts: 32
Reputation: 881

Post » Sat Jan 21, 2012 8:58 pm

maybe on overlap you snap the player to one of the token.
To select the proper token you can have a tiny sprite detector, or compare Y position of player and rope token.

To climb the rope, probably a lerp between Y position of two adjacent token

To swing, apply an impulse on the token your aformentionned detector is on (if there's two, pick one at random :D) on key pressed.

No sure if all that will work but it's my first ideas
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Mon Jan 30, 2012 8:16 pm

I like this. I was doing something similar with discrete sprites. BUT... what goes on with revolute joints? They are supposed to linked "like with a pin" but they streeeeetch. It's doing my head in.
You can see them stretching gently but grab the spawner, move down so the rope touches the ground and yank up quickly... the joints stretch so much that the links start spinning and flickering.
Is there any way to may the joints solid? Does this class as a bug?
B
12
S
2
G
5
Posts: 20
Reputation: 4,032

Post » Sat Sep 29, 2012 9:39 am

Hi Yann,

I recently downloaded your rope capx file.

First of all, I'll like to thank you for sharing your know how.

However, there is something I don't quite understand. What is the purpose of the "Cooldown" Variable for the Player sprite?

Regards,

Gabriel
B
4
Posts: 2
Reputation: 698

Next

Return to How do I....?

Who is online

Users browsing this forum: mercuryus, Naightwolf and 19 guests