How do I make my avatar stick to a rotating object

Get help using Construct 2

Post » Sat Mar 08, 2014 6:04 pm

Forgive me if this has been discussed before, but I wasn't able to find exactly what I'm looking for.

I have a an object with physics added to it so that it behaves as it is swaying in the wind. I also have a character controlled by the player (sticking to a bounding box that has the Platform behaviour added to it), and I'm trying to make it so that the player can jump onto this platform and follow its movements smoothly (while standing still). If the object doesn't sway, it's fine, but as soon as some angle is applied, the character will sort of flicker and move slighty, which doesn't look good at all.

(The platform is sticking to another object with physics applied with Immovable set to Yes using joints.)

Any idea how I can improve this?

Let me know if you need any more info.
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Sat Mar 08, 2014 11:42 pm

you could use the pin behavior to pin your player to the platform as long as he is not moving. when he starts moving unpin him.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Sun Mar 09, 2014 8:55 am

I've tried to play around with the pin behaviour, but I'm not sure I'm using it correctly.

Skjermbilde.PNG


I'm also not sure exactly what other behaviours I need. The playerbox only has the platform behaviour, but when I add physics to the rotating platform I want to be able to jump on, the character just falls through it. Adding Solid as well as Physics to the platform enables to character to walk on it (but not smoothly). Adding physics to the playerbox seems to mess things up even worse.
You do not have the required permissions to view the files attached to this post.
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Sun Mar 09, 2014 9:04 am

Physics behavior doesn't usually play nice with others,you better find another way to do that.
If you want to use physics,use only that.
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sun Mar 09, 2014 9:08 am

Ok, maybe it's easier if I can get the platform to rotate using a different approach. Thanks guys.
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Sun Mar 09, 2014 9:13 am

There's a rotate behaviour
I will not let you reach the sisters
Nature Forums
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Sun Mar 09, 2014 9:19 am

Hey,

If I got it right you could try to add to disable the platform behavior if the player is not moving.

E.g. :

no key pressed = platform disabled and pin enabled
any (move input) key pressed = platform enabled and pin disabled

Cool idea btw. Let me now if that works. ;)

Cheers
Marco
B
34
S
9
G
3
Posts: 206
Reputation: 7,851


Return to How do I....?

Who is online

Users browsing this forum: Lordshiva1948 and 50 guests