How to set a max speed.

HLQuanHLQuan Member, PRO Posts: 10

1.I create an actor 'Player'. 2.The actor 'Player' will follow my mouse cursor by a Constrain Behavior. 3. But I think the 'Player' should not move too fast, so I set a Max Speed of 10 and select 'Apply Max Speed'. 4. At last, It doesn't work. if I move the mouse quickly, the 'Player' would move in a speed a lot more than 10.

Best Answer

  • wcsd9739wcsd9739 Posts: 37
    Accepted Answer

    The Touch1, Touch2, etc are determined by how many touches are on the phone, and where their current positions are... the first touch is Touch1, the second Touch2, and so on. Although I believe Android only supports five or four or something like that. This is why a lot of people just create a new actor that follows the desired touch.

Answers

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    I believe max speed only effects movement when you are using change linear velocity x and y. It will not have any effect when you are constraining movement to the mouse because the constrain takes over and over rides the max speed setting as you have experienced.

  • jsorr2jsorr2 Member Posts: 279

    constrain the mouse X and Y into two real attributes. Then make your actor move towards those two attributes at a certain velocity.

  • HLQuanHLQuan Member, PRO Posts: 10

    @jsorr2 said:
    constrain the mouse X and Y into two real attributes. Then make your actor move towards those two attributes at a certain velocity.

    I create a new actor for these two real attributes. But when the Player actor reaches the new actor's position, it just stop.

  • HLQuanHLQuan Member, PRO Posts: 10

    What would happen if I load my game on Android cell phone. How to set a speed limit?
    It provides touch 1, touch 2... and touch 11. Which one to use?

Sign In or Register to comment.