Some kind of bug I think

0 favourites
  • 5 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi, here is what I am working on and everything is ok: robot.bitballoon.com

    A strange thing happens after I cropped the transparent edges of the enemy sprites (SHIFT+Crop).

    The enemy does not recongnize anymore the walls.

    Here is the link: roboterror.bitballoon.com

    [attachment=1:38jdeige]robot_ss_1.jpg[/attachment:38jdeige]

    [attachment=0:38jdeige]robot_ss_2.jpg[/attachment:38jdeige]

    I don't know what is wrong.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a feeling that the problem is your origin points. Make sure they are in the exact center horizontally. It shouldn't matter where they are vertically.

    In the image editor, when editing the image points, right click on the image with the origin selected and choose Quick Assign > bottom.

    [attachment=0:rq1w6euz][/attachment:rq1w6euz]

  • Hey, PopperOfCorn thanks alot . That was the problem indeed. But I really don't understand why is that ... I thought that collision of the enemy and walls should matter. "Enemy (own collision) - On collision with - enemyborder (own collision)"

    Sorry if my english is bad. Thanks again !

  • You're welcome

    The reason it does that is because when the first wall collision happens, the enemy starts moving the other way, not touching the wall anymore, but then the next tick the enemy mirrors itself, and is now touching the wall again, making it move the OTHER way, and un-mirroring itself, and the process repeats. Hope the pictures help.

    [attachment=0:2nut63bc][/attachment:2nut63bc]

    P.S. The blue dot is the enemy's origin point, the red arrow indicates the direction of the enemy's movement, and the green box is the wall collision happening.

  • Great, I understand now , thank you !

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