Jumping while running & colliding problem

Hello.

I have a problem with my game. When my actor is running at box and colliding with it and i press jump my actor just jumps but does not move over the box if i do not press "move right" button again. Does anyone know how to make it so that if i am pressing "move right" button and press jump it would move over the box when it is above it. (this problem only happens if actor is colliding with the box before the jump)

Thanks for your time and i hope you can help me! :smile:

Comments

  • IceboxIcebox Member Posts: 1,485
    edited August 2016

    Are you using move behavior or change attribute behavior (for movement) ?

  • fatetaletellerfatetaleteller Member, PRO Posts: 40

    @icebox When i press "move right" i use attribute (change attribute: linear velocity x) when i press "jump" i use (change attribute: linear velocity y) and of course collision attribute with the box.

  • IceboxIcebox Member Posts: 1,485

    Try constraining linear velocity x instead of change attribute

  • fatetaletellerfatetaleteller Member, PRO Posts: 40

    @icebox Thank you it worked!

  • IceboxIcebox Member Posts: 1,485

    Awesome you welcome and good luck :)

Sign In or Register to comment.