playMaker

Author Topic: How to draw a curve on Untiy and move an object over it[SLOVED]  (Read 1840 times)

playmakertester

  • Full Member
  • ***
  • Posts: 211
How to draw a curve on Untiy and move an object over it[SLOVED]
« on: October 06, 2020, 12:57:55 PM »
Hello.
I'm planning to make a game like this one.

Please advise me on the actions I need to take in order to make Playmaker behave in a way that allows me to draw curves on a touch screen and have objects move over them.
« Last Edit: October 10, 2020, 01:29:12 AM by playmakertester »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: How to draw a curve on Untiy and move an object over it
« Reply #1 on: October 06, 2020, 01:32:36 PM »
Hi.
You probably would be better off using an asset like this :

https://assetstore.unity.com/packages/tools/physics/draw-and-drive-179806

its just a sample asset, i do not know if this can be used for 2D.

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to draw a curve on Untiy and move an object over it
« Reply #2 on: October 06, 2020, 01:35:19 PM »
I plan to make it a 3d game, so no problem.
I'll look at the assets.
Thanks lot :D
« Last Edit: October 06, 2020, 01:52:08 PM by playmakertester »

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to draw a curve on Untiy and move an object over it
« Reply #3 on: October 09, 2020, 03:08:01 PM »
I actually bought this asset and tried it out, but there was a problem with it at some point.

The asset does not allow for custom GOALS settings to be made in the inspector, which is not a perfect asset for creating a game. I'm going to rebuild it in Playmaker as it's a lot of work to fix the code.

First, I need to create the ability to draw a line with a click.
In my research I found an action called "DrawPathLineRendering", but I couldn't figure out how to set it up to draw a line.

I was wondering if there is an article that explains how to use DrawPathLineRendering.

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to draw a curve on Untiy and move an object over it
« Reply #4 on: October 09, 2020, 04:36:35 PM »
As far as I can tell, if you can do something close to what's in this video, you can pull a Line, but I don't know the details of what each State is doing.


I was wondering if you could give me some advice on how to build a State to control the Line Render on Playmaker.

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to draw a curve on Untiy and move an object over it
« Reply #5 on: October 09, 2020, 07:07:04 PM »
Hello.

Lines can now be drawn with the Draw Path Line Render.
There is only one problem.

The last point and (0,0,0) are always connected as shown in the image, even though Loop is off in the inspector.

If you know a solution to this, please let me know.

playmakertester

  • Full Member
  • ***
  • Posts: 211
Re: How to draw a curve on Untiy and move an object over it[SLOVED]
« Reply #6 on: October 09, 2020, 08:12:23 PM »
I solved this problem by using Array Add instead of Array set