Problem with falling platforms

Bugs will be moved here once resolved.

Post » Sat Sep 22, 2012 8:30 am


I made a very simple falling platform.
it's a block with physics and solid behavior. when the player (a sprite with platform behavior) collides with the block, it waits 1 sec, then becomes non-solid and starts falling by becoming movable (physics).

The problem is that, sometimes, the player ignores the platform behavior's gravity, and starts to fall with the physics behavior's gravity speed, even not having the physics behavior!

And it also it ignores colisions with jump-thru objects...


here, i made a simple capx in case you wanna take a look...

I'm using google chrome (but it happens on firefox too), win7 home basic, and my graphics are updated
B
7
S
2
G
1
Posts: 32
Reputation: 1,089

Post » Sat Sep 22, 2012 10:28 am

Hi Lobo,

nice Example:

Here is a little Solution for you...

Solution

Hope it helps..

You should add the "Jumpt.." Behavior instead of the "solid" Behavior to
the Falling Plattforms...

KMag
KMag2012-09-22 10:37:43
B
13
S
4
G
3
Posts: 120
Reputation: 3,456

Post » Sat Sep 22, 2012 4:48 pm

hm, thanks for the effort, but the problem is still here...
i've been trying different behavior combinations, jump-thru, solid, even using a custom movement vertical speed instead of physics to drop the platform, but it seems like it's about the way platform behavior works, being "attached" to the floor

Somehow, the player keeps attached even when i deactivate the solid/jump-thru behavior

EDIT: actually, i've found a solution...
after the 1 second, when platform becomes not solid, check if player is colliding at an offset with it. if true, add some negative vectorY to te player. this way it "detaches" from the platform when it falls, but still, would be awesome if it happened automaticaly Lobo932012-09-22 16:59:52
B
7
S
2
G
1
Posts: 32
Reputation: 1,089

Post » Sat Sep 22, 2012 5:01 pm

ah - okay..you can post your updated capx when you wan't...

KMag
B
13
S
4
G
3
Posts: 120
Reputation: 3,456

Post » Sat Sep 22, 2012 5:09 pm

OH TRUE!
forgot aout the capx, my bad...

here >>> \o/

its not perfect yet, 'cause the player falls faster than the platform, but at least its not attached to it
B
7
S
2
G
1
Posts: 32
Reputation: 1,089

Post » Sat Sep 22, 2012 5:22 pm

If you read the manual section for Physics, you'll see that physics objects only truly interact with other physics objects, and using solid is totally redundant.

It also mentions in the Physics Basics link that although you can add the Platform behavior and physics, they don't really interact correctly, and all interactions should be performed using the physics attributes.

This could be why you are getting inconsistent results.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,845
Reputation: 48,291

Post » Sat Sep 22, 2012 5:27 pm

nu nu zeno, it's not about the physics
I added physics to make the platform fall, but the bug happens even if i use a custom movement

the problem is: when player is on a solid object and the object becomes non solid, the player keeps "glued" to it
B
7
S
2
G
1
Posts: 32
Reputation: 1,089

Post » Mon Sep 24, 2012 3:06 pm

The falling platform counts as a moving platform so the platform engine will probably try to keep the player sitting on it. You should use your workaround (adjusting the velocity) if you want to avoid this.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Mon Sep 24, 2012 4:55 pm

Yep, i noticed falling and moving platforms changes de velocity of the "player", so he doesnt get glitchy while standing on it ,and it's a good thing... the solution wasnt thaaat hard to figure out

ty anyways, ashley   
B
7
S
2
G
1
Posts: 32
Reputation: 1,089


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests