Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: A3DStudio on September 13, 2012, 04:19:27 PM

Title: [SOLVED] Line Renderer between 2 objects
Post by: A3DStudio on September 13, 2012, 04:19:27 PM
I make a small script to control the start and end position of a line renderer with playmaker.

Web Player Demo: http://db.tt/TLVTbwma (http://db.tt/TLVTbwma)
(click and draw the ball)

(http://a3ds.files.wordpress.com/2012/09/laser_demo.jpg)

1. First create a empty object (Line renderer start position) and place the LineRendererPositions.js script on it. (Download bellow)

2. Second, place a LineRenderer on same object and a PlayMaker FSM.
Set in the Line Renderer > Positions > Size to 2.

(http://a3ds.files.wordpress.com/2012/09/line_renderer_1.jpg)

3. Now create in the FSM a GetPosition and get the Vector3 of this game object. (Line Renderer start position)

4. Create a second GetPosition and get the Vector3 of a second game object. (Line Renderer end position)

5. Now create 2 SetProperty and set the 2 Vector3 values to the LineRendererPositions script on same gameobject.

(http://a3ds.files.wordpress.com/2012/09/line_renderer_2.jpg)

(Sorry my english)
Title: Re: [SOLVED] Line Renderer between 2 objects
Post by: wesleyd on September 17, 2012, 09:58:15 AM
Hello,

Is it possible to have the source of your demo ?

Thanks !  :D
Title: Re: [SOLVED] Line Renderer between 2 objects
Post by: choi on September 19, 2012, 03:06:41 AM
Is a feature that was very necessary.
Thank you.
Title: Re: [SOLVED] Line Renderer between 2 objects
Post by: wesleyd on September 19, 2012, 03:25:56 AM
I just would like to know if it is possible to share your demo, because i like the way to add the power on the ball.

I use your line renderer and it works perfectly but it goes through others objects :(

you can send me a pm if you prefer ;)
Title: Re: [SOLVED] Line Renderer between 2 objects
Post by: A3DStudio on September 19, 2012, 04:59:27 AM
@wesleyd: please check your PM.
Title: Re: [SOLVED] Line Renderer between 2 objects
Post by: Uttpd on September 19, 2012, 09:30:12 AM
Thanks for sharing
Title: Re: [SOLVED] Line Renderer between 2 objects
Post by: choi on October 10, 2012, 09:29:45 AM
Demo can be shared?
Please help