Player fallin while standing on moving platforms

Discussion and feedback on Construct 2

Post » Tue Feb 21, 2012 3:26 pm

[QUOTE=Fistmaker] Screen Shot

Here is a screen shot of the player standing on the platform on my end using the capx you first posted. I'm not sure why the player is falling through on your end, but it's working fine on mine. Have you changed anything since you first posted the capx?[/QUOTE]

Okay, and when he is standing on platform try to press jump.
B
38
S
15
G
6
Posts: 238
Reputation: 7,760

Post » Tue Feb 21, 2012 3:42 pm

Ah, there are a couple of reasons this is happening. Notice how the character is "hopping" in place as the platform moves down? You cannot jump if your character is still "falling". This happens because the platform is moving too fast for your character. Set the platform event to move 0.3 pixels instead of one. You'll see this fixes the error. Also, I'd recommend giving the platform a movement behavior so you can control the movement easier.
B
6
S
1
Posts: 37
Reputation: 774

Post » Tue Feb 21, 2012 4:41 pm

[QUOTE=Fistmaker] Ah, there are a couple of reasons this is happening. Notice how the character is "hopping" in place as the platform moves down? You cannot jump if your character is still "falling". This happens because the platform is moving too fast for your character. Set the platform event to move 0.3 pixels instead of one. You'll see this fixes the error. Also, I'd recommend giving the platform a movement behavior so you can control the movement easier. [/QUOTE]

I am afraid that I needed just such a speed and even more.
B
38
S
15
G
6
Posts: 238
Reputation: 7,760

Post » Tue Feb 21, 2012 6:18 pm

Basically what is happening is that the platform and player vertical velocities are different, so you have to lock player vector y with platform vector y. At the same time disabling gravity maybe. But i believe it's more complex than that since i opened your example, tried this method and failed. There's a series of factors. I believe someone complained about this a while ago and it was fixed internally in the engine, strange;
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Tue Feb 21, 2012 9:21 pm

Just tested that out. If you set an event for the player to match y vector on collision with the platform it works perfectly. I did have to add 8 direction to the platform to do this, but setting

Sprite on Collison with Sprite2: Sprite set Platform Vector Y to Sprite2.8Direction.VectorY

Fixes the problem. Thanks for chiming in Kiyoshi! I hope this helps Vladoss!
B
6
S
1
Posts: 37
Reputation: 774

Post » Wed Feb 22, 2012 8:45 am

[QUOTE=Fistmaker] Just tested that out. If you set an event for the player to match y vector on collision with the platform it works perfectly. I did have to add 8 direction to the platform to do this, but setting

Sprite on Collison with Sprite2: Sprite set Platform Vector Y to Sprite2.8Direction.VectorY

Fixes the problem. Thanks for chiming in Kiyoshi! I hope this helps Vladoss![/QUOTE]

Can you share .capx with me? :P
B
38
S
15
G
6
Posts: 238
Reputation: 7,760

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: Aphrodite, Eisenhans, ishmaelmoreno and 12 guests