Standing on non-solid platforms

This forum is currently in read-only mode.
  • How does the platform behavior detect when a player is standing on a non-solid platform?

    How does it detect walls, celilings?

    I'm thinking of ways for a 2.5D behavior and I can't get this bit right

    ThX

  • I think it basically does an 'is overlapping at offest' test - ie. moves the object 1 pixel down and tests a collision there, and if there is one, the player is on the floor.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • but that test would also stop a sprite from falling if, say, its head is 1px above the platform.

    For solid platforms is not an issue, as the rest of the sprite cannot overlap the platform.

    When the platform is not solid (solid attribute unchecked, platform attribute checked) a 1px offset collision would yield true both for the player standing on top of the platform and overlapping the platform but with its feet poking out of it.

    I can't think of a way that doesn't involve a think detector sprite and that woudln't work if the sprite is going faster than 1px per frame, that's why I ask

  • Oh, for platforms I think it only tests if it's overlapping when the object is falling. Moving up or side to side doesn't check so acts as if it's not there. This allows you to jump upwards through the platform and land on top. You'll have to ask Davo for more detail, he wrote the platform behavior.

  • Paging Dr David...

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)