[BUG] Platform object floats in air

Bugs will be moved here once resolved.

Post » Sat Apr 02, 2016 7:56 pm

Problem Description
Objects with platform behavior (A) hover if the object stood on (B) is solid and becomes non-solid IF the platform object (A) continues to overlap the object (B).

Attach a Capx
h*t*t*p*s*:*/*/*drive.google.com/file/d/0B8yJ9xARb1_JaGJ6V0k5Z3g0Q1E/view?usp=sharing

Description of Capx
Contents:
A controllable (arrow keys) platform object (A).
The floor.
Object (B), it's solid state can be toggled with L and K. Round = Non Solid, rectangle = Solid.

Steps to Reproduce Bug
  • Step 1 Stand on the object in its solid state.
  • Step 2 Flip the object into non-solid state.
  • Step 3 Object with platform behavior will stand on it despite it no longer being solid.

Observed Result
The platform behavior object (A) will be standing on nothing until it jumps or walks off of the edge of the object.

Expected Result
(A) should fall down.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (N/A)

Operating System and Service Pack
Windows 10
No known service pack

Construct 2 Version ID
Release 221
B
10
S
2
Posts: 12
Reputation: 622

Post » Mon Apr 04, 2016 1:35 pm

I just tested with the Platform Plus behavior and it has that bug as well.
I was trying some easy workaround but haven't found any.
B
48
S
14
Posts: 111
Reputation: 3,959

Post » Mon Apr 04, 2016 1:53 pm

Easy way around is to add another action to the one that disables solid that moves the player 1 pixel at angle 270.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,487
Reputation: 59,760

Post » Mon Apr 04, 2016 5:11 pm

zenox98 wrote:Easy way around is to add another action to the one that disables solid that moves the player 1 pixel at angle 270.


Just tried it. Didn't work for some reason.
B
10
S
2
Posts: 12
Reputation: 622

Post » Tue Apr 05, 2016 7:54 am

You're right - I should have looked at your example rather than create my own :/

Anyway, simple way around your issue - and I have tried and verified this with your example - is to just enable or disable collisions for sprite2 when the relevant key is pressed.

So Events 1 and 2 just need a second action that sets the relevant sprite2 collision property - Enable for Event 1 and Disable for Event 2.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
86
Posts: 5,487
Reputation: 59,760

Post » Tue Apr 05, 2016 2:45 pm

zenox98 wrote:You're right - I should have looked at your example rather than create my own :/

Anyway, simple way around your issue - and I have tried and verified this with your example - is to just enable or disable collisions for sprite2 when the relevant key is pressed.

So Events 1 and 2 just need a second action that sets the relevant sprite2 collision property - Enable for Event 1 and Disable for Event 2.


Thanks, works perfectly now :D
B
10
S
2
Posts: 12
Reputation: 622

Post » Tue Apr 12, 2016 11:12 am

There are two problems here:

1) there is a lot of complicated logic in the platform behavior to handle slopes, gravity angles, moving platforms etc. As part of handling this it remembers the object it is currently standing on. This means changing the solidness doesn't immediately take effect until you next jump.
2) your example seems to teleport a large solid object over the player. I'm not sure what you expect the platform behavior to do in response, since it's physically unrealistic. So I don't think any weird behavior doing this should be treated as a bug.

Anyway given both these facts I don't think we'll fix this - it's super complicated code to cover an unrealistic case, and there are workarounds (usually "nudging" the player makes it update the standing-on object again).
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Wed Apr 13, 2016 9:04 pm

Ashley wrote:There are two problems here:

1) there is a lot of complicated logic in the platform behavior to handle slopes, gravity angles, moving platforms etc. As part of handling this it remembers the object it is currently standing on. This means changing the solidness doesn't immediately take effect until you next jump.
2) your example seems to teleport a large solid object over the player. I'm not sure what you expect the platform behavior to do in response, since it's physically unrealistic. So I don't think any weird behavior doing this should be treated as a bug.

Anyway given both these facts I don't think we'll fix this - it's super complicated code to cover an unrealistic case, and there are workarounds (usually "nudging" the player makes it update the standing-on object again).


I should explain the context of the issue being that it it meant to represent the platform being rotated on the x or y axis through the z axis. Basically its a platform that moves on the z axis which is fairly realistic and may occur in a majority of platforms that try to achieve false 3d.

Also its worth mentioning that the player would be jumping off of a then background object which is rather implausible.

Either way, nudging the player does not fix the issue until they are no longer overlapping the object.

Furthermore the object is no longer solid when it changes frames.


Still, I understand this is a fairly rare occurrence and therefor see why its not priority. However I would imagine its a fairly easy fix given that it just needs to update the colliding objects solid detection (then again I may have no idea what im talking about :D ).
B
10
S
2
Posts: 12
Reputation: 622


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest