playMaker

Author Topic: ArrayList Get LineRenderer Positions  (Read 5501 times)

holyfingers

  • Playmaker Newbie
  • *
  • Posts: 34
  • 3D-artist and fledgling Unity Dev.
    • holyfingers.co.uk
ArrayList Get LineRenderer Positions
« on: November 07, 2017, 09:49:19 AM »
Hi there,

I recently put together an action to get all the positions along a Line Renderer curve as an Array of Vector3s, using LineRenderer.Getposition.

It's based on this Get Vertex Positions Action: http://hutonggames.com/playmakerforum/index.php?topic=3982



The yellow spheres here are having their positions set to each curve position every frame... 

At the moment it cycling through the points and adding them to the array, there is a lineRenderer method to get them all at once which I assume would be much more efficient, but I couldn't get it to work!

I've also updated my Draw Curve actions to allow you to specify a Game Object variable for the Line renderer to make it easier to work with this action: http://hutonggames.com/playmakerforum/index.php?topic=11193.msg74970#msg74970

Let me know if you have any thoughts!

Cheers,

Nick
Twitter: @holyfingers

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: ArrayList Get LineRenderer Positions
« Reply #1 on: November 08, 2017, 03:49:44 AM »
Hi,

 excellent!


Bye,

 Jean

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: ArrayList Get LineRenderer Positions
« Reply #2 on: November 08, 2017, 10:07:28 AM »
Wow, this is awesome!
Available for Playmaker work

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: ArrayList Get LineRenderer Positions
« Reply #3 on: November 08, 2017, 02:42:25 PM »
Hi,
Very Nice!