playMaker

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

holyfingers

  • Playmaker Newbie
  • *
  • Posts: 31
  • 3D-artist and fledgling Unity Dev.
    • View Profile
    • holyfingers.co.uk
ArrayList Get LineRenderer Positions
« on: November 07, 2017, 07: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: 12344
  • Official Playmaker Support
    • View Profile
Re: ArrayList Get LineRenderer Positions
« Reply #1 on: November 08, 2017, 01:49:44 AM »
Hi,

 excellent!


Bye,

 Jean

krmko

  • Sr. Member
  • ****
  • Posts: 422
    • View Profile
    • Fat Pug Studio
Re: ArrayList Get LineRenderer Positions
« Reply #2 on: November 08, 2017, 08:07:28 AM »
Wow, this is awesome!

djaydino

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