Movement

twayne1twayne1 Member Posts: 43

How can I make an actor move between two way points, but not go flying away when an actor jumps on it? So an actor that's movable and also able to be jumped on, (not including rotation.)

Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Yes. You can fix the position of an actor using constrain attributes. You will need two self real attributes to track the position of the actor constantly and the reference those positions when you want to freeze it.

    Two self real attributes

    Position_X
    Position_Y

    At the top of the actor code stack

    Constrain attribute self.Position_X to self.x
    Constrain attribute self.Position_Y to self.y

    Have a rule

    When actor reaches spot you want to freeze it at.

    Constrain self.x to self.Position_X
    Constrain self.y to self.Position_Y

  • twayne1twayne1 Member Posts: 43

    Sorry I don't understand that... I fixed my problem by making my actor have tons of density.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @twayne1 said:
    Sorry I don't understand that... I fixed my problem by making my actor have tons of density.

    That won't always work. See my video series on the gamesalad physics.

Sign In or Register to comment.