MoveTowards() is undocummented.

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Deses
Posts: 15
Joined: Fri May 28, 2021 9:27 am

MoveTowards() is undocummented.

Post by Deses »

And that's it. I wanted to see what that Sequencer Command takes as parameters but it's completely missing from the docs and there's not a single mention in the forums.

Could you please add them to the docs, please? :)


For anyone else that gets to this thread, I took a look at the code and looks like MoveTowards expects a "CharacterPhysicsManager" as the controlled character, and a "Transform" for the destination.
Deses
Posts: 15
Joined: Fri May 28, 2021 9:27 am

Re: MoveTowards() is undocummented.

Post by Deses »

Oh by the way, I wanted to see the docs because I defined

Code: Select all

MoveTowards(Player, Destiantion)
where Destination is another GameObject in Point A, but the MoveTowards() goes to the Transform of the GameObject where the Dialogue System Trigger lives, Point B.
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: MoveTowards() is undocummented.

Post by Tony Li »

Hi,

It's MoveTo().

The parameters are flipped from your example:

Code: Select all

MoveTo(Destination, Player)
This is so you can omit the mover if you want to use the node's speaker:

Code: Select all

MoveTo(Destination)
Deses
Posts: 15
Joined: Fri May 28, 2021 9:27 am

Re: MoveTowards() is undocummented.

Post by Deses »

Hi Tony, thanks for the quick answer!

I now understand my confusion. MoveTowards is a custom Sequence my colleague made a long time ago, since I just joined him I wasn't aware of that.

Now that I know that I'll change the code myself. :)

If you want to see the differences between the sequences:
  • MoveTo moves the character instantly or during n seconds, but the character speed is not consistent depending on where the character triggers the sequence and it doesn't use any animation. That's good for teleport events or carefully scripted events.
  • MoveTowards, in the other hand, takes the character and moves it to the Transform with the character's default speed AND does use the animation.
I've made a short video to show you this:


Sorry for wasting your time! :oops: :oops:
User avatar
Tony Li
Posts: 22161
Joined: Thu Jul 18, 2013 1:27 pm

Re: MoveTowards() is undocummented.

Post by Tony Li »

Got it. No worries!
Post Reply