playMaker

Author Topic: render line from vector3 array  (Read 878 times)

trsnell

  • Playmaker Newbie
  • *
  • Posts: 8
    • Portfolio
render line from vector3 array
« on: April 04, 2019, 04:32:30 PM »
Is there a way to use an array input with Line Renderer? I found the Set Line Render Position and Set Line Render Position Count actions in the PlayMaker Ecosystem, but rather than inputting a single point I want to just input a vector3 array to draw the entire thing at once.

I'm using the Trail Renderer Get Position action (also found in the Ecosystem) to build an array during play, which I then want to save and reload, but I'm getting stuck on how to use that array draw a "new" line. Being able to directly pull an array of positions from the Trail Renderer at the end of play would probably be better, too.

I looked into doing a sort of "live" draw running down the array index, but got stuck with that too, and simply using an array seems way more straightforward and clean.

I've come across getPositions and setPositions (plural) for trail and line renderer in the API, which sound like what I'm looking for, but I don't know C# and would prefer to keep the coding in Playmaker anyway if I can.

Any help would be greatly appreciated!