No announcement yet.

Stopping MoveTo()

  • Filter
  • Time
  • Show
Clear All
new posts

    Stopping MoveTo()

    I'm currently using the latent AIController function MoveTo() to move my pawns very short distances. However, there are times when I need to stop MoveTo() before it reaches it's destination. (i.e. in NotifyBump() in my AIController)

    var float MoveTimer; appears to be what I'm looking for but setting MoveTimer to a very short time value doesn't seem to force MoveTo() to return before it reaches it's target location.

    Any idea to why?

    Or another way to force MoveTo() to return before it reaches it target location?


    I found out what I was doing wrong. MoveTimer is the amount of time remaining before MoveTo() returns regardless of it reaching its destination. MoveTimer is set in MoveTo() and is an estimate (I think) of how long it should take this pawn to reach the location.

    So setting MoveTimer = -1.0 in BumpNotify() in my case, causes MoveTo() to return immediately (the next tick.)