Forums

OverviewV-Play 1 Support › move entity to exact position and stop

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5188

    Vlad

    how?

    MovementAnimation doesnt emits stop, and, truly its not clear how to set there target point

    MoveToPointHelper has target point but unclear how to start it

    any other options?

    thanks

    #5189

    David

    Hi Vlad,

    you can use the signal MovementAnimation::onLimitReached(), covered in the documentation here http://v-play.net/doc/movementanimation.html#onLimitReached-signal, to stop the MovementAnimation which is emitted when one of the limits is reached. Moreover, you can use the MoveToPointHelper::targetReached() signal to detect if the target point was reached by the target object using the MoveToPointHelper as stated in the documentation here http://v-play.net/doc/movetopointhelper.html#onTargetReached-signal.

     

    Cheers,

    David

    #5190

    Vlad

    thanks

    what if I’ll use NumberAnimation ?

    #5214

    David

    Hi Vlad,

    of course you could also use a NumberAnimation and use its running property to determine the end value.

    onRunningChanged: {
      if(!running) {
        // Do something here
      }
    }

    Anyway, I would recommend to use the MovementAnimation because it is synchronized with the framerate.

    Cheers,

    David

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support