playMaker

Author Topic: How to move objects at a constant speed along the lines drawn by DrawPathLine  (Read 1955 times)

playmakertester

  • Full Member
  • ***
  • Posts: 211
Please tell me how to move objects at a constant speed along the lines drawn by DrawPathLineRendering.

Right now, I am drawing a line using DrawPathLineRendering. Specifically, I put the mouse position at one point and the next few seconds after the mouse position in Array and draw a line accordingly.

When we move the target object in this way with MoveTo to the Vector3 of the Array, the object will replicate the speed at which we drew the line and will move slowly or quickly.

Is there a way to make the object move at a constant speed over the line drawn by DrawPathLineRendering?

playmakertester

  • Full Member
  • ***
  • Posts: 211
DOTween Playmaker Actions - Transform Path Example works perfect this time.


playmakertester

  • Full Member
  • ***
  • Posts: 211
I've tried DoPath.

I have purchased and am now using DoTween, which is available in Playmaker.
https://assetstore.unity.com/packages/tools/visual-scripting/playmaker-actions-for-dotween-by-doozy-49222?locale=ja-JP

When I checked, the relevant asset here seems to be an Action called "DO Tween Transform Path".

Unfortunately, "Path" does not seem to be able to be a variable in this Action, which means it must be defined numerically in advance.
(i.e., the Path must be defined numerically beforehand)

The length of the LineRender changes each time you draw, so you can set it to a variable or set it to
I seem to need to set all Vector3 to it with a fixed path length, is it possible to tell me if you know how to solve this problem?

If you know how to solve this problem, please let me know.