Help jumping over a box...

LuMa GamesLuMa Games USAMember Posts: 129

My problem can be explained easier through a 10 second video. Take a look: http://www.mediafire.com/watch/c6lqcgzmlqnn2tj/Video_11-11-2014_9-04-21_PM.mp4

Comments

  • LuMa GamesLuMa Games USAMember Posts: 129

    Help please

  • BBEnkBBEnk Member Posts: 1,764

    How are you moving your actor forward?

  • LuMa GamesLuMa Games USAMember Posts: 129

    @BBEnk said:
    How are you moving your actor forward?

    Rule

    When Left is Down
    When Right is Up

    Change Main_Character's Linear Velocity X to -750

    (I don't remember the exact speed, probably around 750)

  • BBEnkBBEnk Member Posts: 1,764

    @Luma‌

    So I'm guessing your using a change attribute to set speed to -750 when you press left, and what will happen as soon as you hit the block that speed goes to 0 and want change back to -750 until you press left again.
    Try using a move behavior instead because it will continue trying to move even when pushing against the block.

  • jeezzcakejeezzcake Member Posts: 144

    Try to constrain self.position.x to self.position.x - 3 ( for left movement ) and self.position.x to self.position.x + 3 (for right movement)

  • LuMa GamesLuMa Games USAMember Posts: 129

    @BBEnk‌

    Yes, I am using change attribute. The "Move" behavior doesn't work well when mixed with jumping so that isn't an option. (Basically if I were to jump and move left or right, I would fall significantly slower than usual)

  • LuMa GamesLuMa Games USAMember Posts: 129

    @jeezzcake said:
    Try to constrain self.position.x to self.position.x - 3 ( for left movement ) and self.position.x to self.position.x + 3 (for right movement)

    This method does work, however 3 is too slow and if I were to change it to a higher number the movement is too jumpy. For example if I change it to 8 or so, that means my character is jumping over 8 pixels constantly and that prevents the movement from being smooth.

  • LuMa GamesLuMa Games USAMember Posts: 129

    @jeezzcake‌

    I played around with your idea a little bit and ended up getting it to work. I constrained the linear velocity to -750 instead of just changing it to -750 and that fixed the issue. Thanks for the help guys :)

Sign In or Register to comment.