0 Favourites

Solid Collision Bug

  • Problem Description

    When a flat solid moving on the X axis collides with a player (8 direction box sprite), the played is pushed backwards AND upwards (both X and Y axis). When both these objects collide the player should only be moving along the X axis.

    Attach a Capx

    Attached at the bottom of post.

    Description of Capx

    Rectangular solid moving forward every tick collides with box sprite with the 8 direction behaviour.

    Steps to Reproduce Bug

    Reproduced in Capx.

    Observed Result

    Box sprite is pushed upwards and backwards.

    Expected Result

    Box sprite should only be pushed backwards.

    Affected Browsers

    • Chrome: Yes
    • FireFox: Yes
    • Internet Explorer: Yes

    Operating System and Service Pack

    Windows 7 SP1

    Construct 2 Version ID

    Release 168 (64-bit)

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Closing as won't fix: since you use 'move at angle' and the 8 direction behavior, you are causing a conflict. Setting the position effectively teleports the object, and then the 8 direction behavior notices it has been wedged inside a solid without knowing how it got there. This causes it to use a last-ditch "get me out of here" algorithm which happens to use a spiral search for the nearest free space, which in this cause causes it to move both up and right. Workaround: use 'simulate control left' instead and it works correctly, since the 8 direction behavior then controls the movement, knows where it came from, and can handle the collision correctly.

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