Advanced Movement Multiply Wrong?

Discussion in 'Technical Discussion' started by trudnai, Aug 17, 2016.

  1. trudnai

    trudnai Miniboss Boxer

    Joined:
    Sep 25, 2015
    Messages:
    1,235
    Likes Received:
    701
    Hey Guys,

    I wanted to achieve similar stuff as Wall Reverse, so that character changes direction whenever touches the wall. However, I wanted to do that by multiplying the current velocity by -1 instead of replacing it by a constant. This way even if I hit the wall from the other side it will still do the reversing, no need double sided walls...

    However, if I do this as soon as character touches the wall it will stuck and bouncing couple of pixels left and right very quickly, never leaving the spot. I guess because for some reason collision happens again and again and again with the same wall, but I am not sure why? When first collision occurs it should just change direction and start moving backwards, it should never collide again until "untouched" the wall.

    Does it behaves the same for you guys? Is this a bug, feature or a "user error"?
     
  2. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,810
    Likes Received:
    1,026
    I am getting the same results... -1 multiply on collision should bounce the toon off the wall... from one direction it just stops, from the other, it does the 1 pixel dance...

    2.2.4... will mention in beta thread
     
  3. jayloh90

    jayloh90 Boxer

    Joined:
    Dec 19, 2016
    Messages:
    28
    Likes Received:
    12
    Is this Problem Still Persisting?!
     

Share This Page