bouncing elevator help

nowherejaynowherejay Member, PRO Posts: 85

Hello,

I have a lovely elevator going up and down using interpolate between two Y coordinates and seems to work great when the hero character is on the elevator moving up. However, when the hero is on the elevator moving down, he bounces and the elevator also bounces. Is their a way to make the hero "stick" to the platform without the little bounces when moving down on the elevator?

Thank you!

Comments

  • KevinCrossKevinCross London, UKMember Posts: 1,894

    Check out the video tutorial in this comment from @jamie_c

    http://forums.gamesalad.com/discussion/comment/545709/#Comment_545709

  • ArmellineArmelline Member, PRO Posts: 5,415

    If you're interpolating the elevator, make sure you uncheck the "Movable" box in the Physics section.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Increase the density and friction of your hero.

  • ArmellineArmelline Member, PRO Posts: 5,415

    @The_Gamesalad_Guru said:
    Increase the density and friction of your hero.

    In my experience this helps, but never fully avoids the "push" effect of the player actor. It's one of the things that frustrates me most about GameSalad - how hard it is to have something collide-able but unmovable by other actors, especially when you want it to move along a set path.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @Armelline said:
    In my experience this helps, but never fully avoids the "push" effect of the player actor. It's one of the things that frustrates me most about GameSalad - how hard it is to have something collide-able but unmovable by other actors, especially when you want it to move along a set path.

    Yep we all know the physics engine is lame which is why Graphene was a vital piece of software for the future.

  • nowherejaynowherejay Member, PRO Posts: 85

    Thank you for the help! I tried turning the density and friction up but no luck, to much and he fell through the platform lol and not enough and he would still bounce.

  • tintrantintran Member Posts: 453
    edited July 2015

    I tried this and it seemed to work
    create a game boolean called is_on_elevator, and a real called elevator_y
    Then in your hero actor
    add rule
    if all these are happening

    • collision if elevator
    • is_on_elevator is false
    • self.position.x is greater than (your elevator's hardcoded x - elevator.width)
    • self.position.x is greater than (your elevator's hardcoded x + elevator.width)
      do

    • set is_on_elevator to true
      else
      -set is_on_elevator to false

    then another rule
    if is_on_elevator is true

    • constraint hero.position.y to game.elevator_y + (offsets so that hero is on elevator)

    then in your elevator actor
    add a rule
    if is_on_elevator is true

    • constraint game.elevator_y to self.position.y
Sign In or Register to comment.