Issue with platform behavior

Bugs will be moved here once resolved.

Post » Wed Dec 28, 2016 7:56 pm

Problem Description
If you try to jump against a wall keeping the direction to the right pulsed, the sprite object with the behavior platform will be locked.
The object should jump, but obviously it should not go forward because there is a wall. In the example the object does not jump, it only trembles.


Attach a Capx

Description of Capx
Sprite with platform behavior and some green solids

Steps to Reproduce Bug
- Press and hold right cursor
- Also press cursor up to jump
- The sprite gets stuck

Observed Result
The sprite is not able to jump because the right cursor is being pressed.

Expected Result
The sprite must be able to jump even though the right cursor is being pressed.
The sprite, obviously, should not advance until it exceeds the height of the solid.

Affected Browsers
  • Chrome: (YES)

Operating System and Service Pack
win7 64 bits SP2

Construct 2 Version ID
R241 64bits
Posts: 919
Reputation: 15,106

Post » Thu Jan 19, 2017 5:00 pm

Closing as won't fix. The problem is you use a tiny object with a very low jump strength of 16. This means when you jump assuming 60 FPS it steps about 0.26 of a pixel - so small that the next tick the platform behavior still detects itself as being on the floor. It has to have some tolerance threshold for the various collision algorithms it uses to work. If you set the jump strength to something higher like 50 it works fine.

I don't think we can change this without breaking other platform games. You'll have to just use larger objects (given you use 8x8 objects, a 1px tolerance in the collision detection algorithms is quite large relative to the object size), or a higher jump strength.
Scirra Founder
Posts: 25,205
Reputation: 200,351

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest